Readme for: Model file for Ishikawa et al. "Automatic Detection of Occulted Hard X-ray Flares Using Deep-Learning Methods" in Sol. Phys. (2021). Retrieved from the Data Repository for the University of Minnesota, https://doi.org/10.13020/wtbm-2258. Related paper: Ishikawa, Shin-nosuke; Matsumura, Hideaki; Uchiyama, Yasunobu; Glesener, Lindsay. (2021). Deep-learning model for occulted hard X-ray flare detection Ishikawa et al. 2021, Sol. Phys. http://doi.org/10.1007/s11207-021-01780-x model_occulted_flare_classifier.h5 is a Keras model file to detect occulted hard X-ray flares by RHESSI spectrogram data described in Ishikawa et al. 2021. The model file was created with Python 3.6.8, Tensorflow 1.14.0 and Keras 2.2.4. We also checked the model file with the Google Colaboratory environment (Python 3.6.9 and Tensorflow 2.4.0). --- DRUM curator note: code works after further tweaking of my Conda environment: conda create -n solar_flare -c conda-forge tensorflow=1.14 keras=2.2.4 h5py=2.10.0 Without specification of the h5py version the code crashes here: model = load_model('model_occulted_flare_classifier.h5'). --- Input: input_data[n_events, 100, 100, 3] - Spectrograms obtained by hsi_lightcurve in the RHESSI software. (100, 100, 3) shape is for (energy, time, channel). The energy bins should cover 2-52 keV with 0.5 keV bin size. The time bins should cover one spacecraft rotation period. Identical two-dimensional spectrogram data should be put for all three channels. Output: label[n_events, 2] - Labels of either of two classes - "occulted" or "on-disk." [1, 0] shows occulted, and [0, 1] shows on-disk. Example: ### from tensorflow.keras.models import load_model # This is for Tensorflow 2.X. With Tensorflow 1.X, use: # from keras.models import load_model model = load_model('model_occulted_flare_classifier.h5') model.predict(input_data) ### You can read the sample data with python by: -- import numpy as np input_data = np.load('input_data_sample.npy') -- Then, with Tensorflow, you can check it works with the model file by: -- from tensorflow.keras.models import load_model # or "from keras.models import load_model" for ver 1.X model = load_model('model_occulted_flare_classifier.h5') model.predict(input_data) -- This sample data includes one flare and it is the September 10, 2017 event (ID 17091037 in the RHESSI flare list), and you will get the label to be [9.9999964e-01, 3.4476005e-07] meaning 99.99996% occulted.