spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

Update MMS sunlight masking tables #145

Closed jameswilburlewis closed 5 months ago

jameswilburlewis commented 5 months ago

From Christine Gabrielse:

I noticed the sunlight masking tables are not yet updated in SPEDAS. It looks like the 4 attached .csv files should go here in the nightly build:

\spdsw_latest\spdsw_r32450_2024-02-20\idl\projects\mms\feeps\sun\ Next, mms_read_feeps_sector_masks_csv.pro needs to be updated at lines 53 and 54, the last two lines below:

dates = [1447200000.0000000, $ ; 11/11/2015
             1468022400.0000000, $ ; 7/9/2016
             1477612800.0000000, $ ; 10/28/2016
             1496188800.0000000, $ ; 5/31/2017
             1506988800.0000000, $ ; 10/3/2017
             1538697600.0000000, $ ; 10/5/2018
             1642032000.0000000, $ ; 1/13/2022
             1651795200.0000000, $ ; 5/6/2022
             1660521600.0000000, $ ; 8/15/2022            
             1706832000.0000000] ; 2/02/2024

I am CC’ing Joe Fennell here because looking at the mms_read_feeps_sector_masks_csv.pro code, I’m not sure if it is doing the correct thing.

After the above matrix, the code says:

nearest_date = find_nearest_neighbor(dates, time_double(trange[0]), /allow_outside)
    dprint, dlevel = 2, 'Removing sun contamination using the file: MMS#_FEEPS_ContaminatedSectors_'+time_string(nearest_date, tformat='YYYYMMDD')+'.csv

But from talking to Joe, I don’t believe it should be finding the nearest date. In other words, 01/01/2024 should not use 02/02/2024 masking table. It should use the 8/15/2022 masking table, because that is what will match the onboard data. Joe, can you confirm this please?

If I am correct, then mms_read_feeps_sector_masks_csv.pro needs to be updated so that it selects the time in the array that is prior to the input time but not after.

I’m not sure if mms_feeps_remove_bad_data.pro is still being updated or needs to be updated.

MMS1_FEEPS_ContaminatedSectors_20240202.csv

MMS2_FEEPS_ContaminatedSectors_20240202.csv

MMS3_FEEPS_ContaminatedSectors_20240202.csv

MMS4_FEEPS_ContaminatedSectors_20240202.csv