This package is not maintained any more! Please use https://github.com/serpentine-h2020/SEPpy instead!
Python data loader for SOHO charged particle instruments. At the moment provides released data obtained by SunPy through CDF files from CDAWeb for the following datasets:
'SOHO_CELIAS-PM_30S'
: SOHO CELIAS-PM 30 second data (Info)'SOHO_CELIAS-SEM_15S'
: SOHO CELIAS-SEM 15 second data (Info)'SOHO_COSTEP-EPHIN_L2-1MIN'
: SOHO COSTEP-EPHIN Level2 intensity 1 minute data (Info) [1]'SOHO_COSTEP-EPHIN_L3I-1MIN'
: SOHO COSTEP-EPHIN Level3 intensity 1 minute data (Info)'SOHO_ERNE-LED_L2-1MIN'
: SOHO ERNE-LED Level2 1 minute data (Info)'SOHO_ERNE-HED_L2-1MIN'
: SOHO ERNE-HED Level2 1 minute data (Info)
[1] | SOHO COSTEP-EPHIN Level2 intensity 1 minute data is directly obtained through ASCII files from the server of the instrument team, not via SunPy/CDAWeb. |
This software is provided "as is", with no guarantee. It is no official data source, and not officially endorsed by the corresponding instrument teams. Please always refer to the instrument descriptions before using the data!
The standard usecase is to utilize the soho_load
function, which
returns Pandas dataframe(s) of the measurements.
from soho_loader import soho_load
import datetime as dt
df, meta = soho_load(dataset="SOHO_ERNE-HED_L2-1MIN",
startdate=dt.datetime(2021, 4, 16),
enddate="2021/04/20",
path=None,
resample="1min",
pos_timestamp=None,
max_conn=5)
dataset
:'SOHO_CELIAS-PM_30S'
,'SOHO_CELIAS-SEM_15S'
,'SOHO_COSTEP-EPHIN_L2-1MIN'
,'SOHO_COSTEP-EPHIN_L3I-1MIN'
,'SOHO_ERNE-LED_L2-1MIN'
, or'SOHO_ERNE-HED_L2-1MIN'
. See above for explanation.startdate
,enddate
: datetime object or "standard" datetime stringpath
: String, optional. Local path for storing downloaded data, e.g.path='data/soho/'
. By defaultNone
. Default setting saves data according to sunpy's Fido standards. The default setting can be changed according to the corresponding sunpy documentation, where the setting that needs to be changed is nameddownload_dir
(e.g., one could set it to a shared directory on a multi-user system).resample
: Pandas frequency (e.g.,'1min'
or'1h'
), orNone
, optional. Frequency to which the original data is resamepled. By defaultNone
.pos_timestamp
: String, optional. Change the position of the timestamp:'center'
or'start'
of the accumulation interval, by defaultNone
.max_conn
: Integer, optional. The number of parallel download slots used byFido.fetch
, by default5
.
- Pandas dataframe and dictionary of metadata (e.g., energy channels). See info links above for the different datasets for a description of the dataframe columns.
From the SOHO COSTEP-EPHIN Level2 intensity 1 minute data ('SOHO_COSTEP-EPHIN_L2-1MIN'
), only electron data is returned at the moment. The proton and Helium measurements are not provided, see #3 for more details.
- COSTEP-EPHIN Level2: All data files are automatically saved in a
data
subfolder in the current working directory ifpath
is not defined. - All other instruments: All data files are automatically saved in a
sunpy
subfolder of the current user home directory ifpath
is not defined.
For ERNE measurements, it's possible to combine the intensities of multiple adjacent energy channels with the function calc_av_en_flux_ERNE
. It returns a Pandas Dataframe with the arithmetic mean of all intensities and a string providing the corresponding energy range. The following example demonstrates how to build an average channel of ERNE proton energy channels 2 to 8.
from soho_loader import soho_load, calc_av_en_flux_ERNE
# first, load original data:
df, meta = soho_load(dataset="SOHO_ERNE-HED_L2-1MIN",
startdate="2021/04/16",
enddate="2021/04/20",
path=None,
resample="1min",
pos_timestamp=None)
# define energy channel range that should be combined:
combine_channels = [2, 8]
erne_avg_int, erne_avg_chstring = calc_av_en_flux_ERNE(df,
meta['channels_dict_df_p'],
combine_channels,
species='p',
sensor='HET')
print(erne_avg_chstring)
This project is Copyright (c) Jan Gieseler and licensed under the terms of the BSD 3-clause license. This package is based upon the Openastronomy packaging guide which is licensed under the BSD 3-clause license. See the licenses folder for more information.
The development of this software has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 101004159 (SERPENTINE).