NuSTAR / nustar-clock-utils

Utilities for a precise timing calibration of NuSTAR data
3 stars 3 forks source link

High resolution and fix recent #20

Closed matteobachetti closed 3 years ago

matteobachetti commented 3 years ago
  1. Separates the high-resolution clock file machinery in #18 from the different divisor reference;
  2. Fixes the problem of the spline fitting at the end of the solution

Tested on the test data, the performance is indeed slightly better, giving ~10us stability on short (orbital) time scales. I'm not sure it's worth the large size, but having the option is better than not having it. Also, it's good for testing purposes.

From my tests:

matteobachetti commented 3 years ago
image

This is what the end of the solution looks now

bwgref commented 3 years ago

For testing I have:

Downloaded the latest tcxo_tmp_archive.csv, latest_clock.dat, and latest_freq.dat from ran.

Nuked my local tcxo_tmp_archive.hdf5 file.

Then:

(1) Update temperature archive:

nustar_update_temperature tcxo_tmp_archive.csv -o tcxo_tmp_archive.hdf5

(2) Then when I run:

nustar_clockfile tcxo_tmp_archive.hdf5 latest_clock.dat latest_freq.dat -o test_clock.fits

...I get a random Matplotlib window that pops up. Maybe a stray plt.show()? I'll see if I can find it.

First, in general the solution seems to look very clean and great. However...

(3) When I look at test_clock.html (the summary page) it seems like it's showing a different solution than when I use nustar_clean_clock. Here's what the test_clock.html page looks like, which shows a large discontinuity around 2017:300 (2017/10/31...happy Halloween!). This wasn't there in previous iterations, so it was introduced in this run:

Screen Shot 2020-10-27 at 9 39 09 AM

If I look at the same time range using nustar_clean_clock this discontinuity isn't there:

Screen Shot 2020-10-27 at 9 36 15 AM

...so what am I doing something wrong here?

bwgref commented 3 years ago

User error. List of local cache files that need to be removed before running are:

rm tcxo_tmp_archive.hdf5 <---if backfilling the temperature database rm dump.hdf5 <--- every time? rm save_all.pickle <--maybe?

After running everything is fine. Also, after running nustar_clean_clock I think it overwrote the dump.hdf5 file, at which point the nustar_clock_file produced the correct solution.

Merging this PR now.