spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
155 stars 60 forks source link

Update MMS FEEPS sunlight contamination files for SPEDAS and PySPEDAS #1026

Closed jameswilburlewis closed 1 month ago

jameswilburlewis commented 1 month ago

From Christine G: New sunlight contamination tables have been uploaded to the MMS probes, so we need to incorporate them into SPEDAS and PySPEDAS.

jameswilburlewis commented 1 month ago

Some of the CSV files contain trailing commas, which causes problems reading the files in Python (tries to convert a blank field to an integer).

There also seems to be a mix of DOS and Unix line endings.

Some of the more recent files seem to have UTF-8 byte order marks, which were being interpreted as data in the Python CSV reader and causing problems. Specifying encoding='utf-8-sig' when opening the files seems to work whether or not a BOM is present.