spedas / pyspedas

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

time_double function in get_w #1011

Closed PluckZK closed 1 month ago

PluckZK commented 1 month ago

https://github.com/spedas/pyspedas/blob/e0f809c26a3fd81746d5b1006e9407cff3340c26/pyspedas/geopack/get_w_params.py#L69

Can the format of "time_strings = str(int(doy))" be used as input to "time_double" functions?

In fact, if you use [2015-9-20/07:20:00,2015-9-20/08:00:00] as input to the get_w function, you will not get any output of the w parameter.

jameswilburlewis commented 1 month ago

Yes, time_double accepts formats like "YYYY-DOY" and inteprets them correctly:

from pytplot import time_double
time_double('1970-002')
Out[11]: 86400.0
time_double('1970-002 00:00:30')
Out[12]: 86430.0

2015-09-20 is day 263 of year 2015. Unfortunately, that falls into a data gap in the downloaded coefficient file:

2015 254 12 20   -0.39   -7.34   -1.81  -651.8    37.2     9.5   5.07  216750.  -63.0    1    1  0.1447   4.19   0.76   0.70   0.71   1.04   1.49   2.57
2015 268 14 20    2.06   -2.65    2.63  -466.0   -54.4   -12.3   4.99  133877.   -8.0    1    1  0.1216   2.13   0.00   0.00   0.00   0.00   0.00   0.00
PluckZK commented 1 month ago

Thank you very much!