pysat / pysatNASA

pysat support for NASA Instruments
BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

ENH: REACH data #206

Closed jklenzing closed 1 year ago

jklenzing commented 1 year ago

Description

Type of change

How Has This Been Tested?

import datetime as dt
import pysat
import pysatNASA

reach = pysat.Instrument(inst_module=pysatNASA.instruments.reach_dosimeter, inst_id='101')
reach.remote_file_list()

reach.download(dt.datetime(2017, 4, 10))
reach.load(date=dt.datetime(2017, 4, 10))
reach.data

Test Configuration:

Checklist:

If this is a release PR, replace the first item of the above checklist with the release checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release

jklenzing commented 1 year ago

Still needs:

jklenzing commented 1 year ago

The acknowledgement string is more complicated than expected. Using standard copy paste for now, documented potential paths forward in #207.

jklenzing commented 1 year ago

Note for testing:

import pysat
import pysatNASA
reach = pysat.Instrument(inst_module=pysatNASA.instruments.reach_dosimeter, inst_id='101')
reach.acknowledgements

yields

'Please load a file for full acknowledgments.'

Assuming you have downloaded files, running

reach.load(date=reach.files.files.index[0])
reach.acknowledgements

will then yield the full acknowledgement string.

aburrell commented 1 year ago

Ok, the data loads well, but the global file attributes in MetaHeader have problems. A benign example that I would let pass is reach.meta.header.Notes is nan. A malignant example is Temperature_Sensitivity_43-65_deg, whose string format is not appropriate for an attribute name and so is not accessible. I think this can be fixed by replacing the - with a _ in the load function.

Note: you can access the object using getattr(reach.meta.header, 'Temperature_Sensitivity_43-65_deg'), but not reach.meta.header.Temperature_Sensitivity_43-65_deg. This raises SyntaxError: invalid decimal literal.