Dataset utils specific to MMS.
filename_to_filepath
filename_to_filepath(filename)
Create a filepath based on the filename for a mms CDF file
Filename format is assumed to be
mms1_fpi_fast_l2_dis-dist_20171129160000_v3.4.0.cdf {probe}{inst}{mode}{data_level}{data}{time}{version}.cdf
Output will have the format: ./mms/mms1/fpi/fast/l2/dis-dist/2017/12/{filename}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
string
|
The filename to convert to a file path. |
required |
Returns:
| Type | Description |
|---|---|
|
A string with the file path. |
get_file_list
get_file_list(start_date, end_date, data_rate='fast', data_level='l2', datatype=None, instrument='fpi', sc_id='mms1')
Get a list of files from the MMS Science Data center. For a full list of the possible parameters, look at "Query Parameters" on the MMS Science Data center, "How to get data" page: https://lasp.colorado.edu/mms/sdc/public/about/how-to/
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
string
|
The start date for files, format YYYY-MM-DD. |
required |
end_date
|
string
|
The end date for files, format YYYY-MM-DD. |
required |
data_rate
|
string
|
The data rate, fast, burst or srvy. |
'fast'
|
data_level
|
string
|
The level of data post processing. |
'l2'
|
datatype
|
string
|
The datatype (not always used). |
None
|
instrument
|
string
|
The instrument onboard mms. |
'fpi'
|
sc_id
|
string
|
The spacecraft id, mms1, mms2, mms3 or mms4. |
'mms1'
|
Returns:
| Type | Description |
|---|---|
|
A list of files. |
download_cdf_files
download_cdf_files(rootdir, cdf_filepaths, session=None)
Download CDF files from the MMS Science Data Center based on a file list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rootdir
|
string
|
Root directory for storing downloaded files. |
required |
cdf_filepaths
|
list
|
The paths to store the files (including filename). The filename have to be the same as the file to download. |
required |
session
|
Object
|
The request session to use, if one exists. |
None
|