sot / xija

Thermal modeling framework for Chandra X-ray Observatory
https://sot.github.io/xija
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Change two ACIS tests to use modern reference data #89

Closed taldcroft closed 4 years ago

taldcroft commented 4 years ago

Description

The xija ACIS DPA regression tests were using reference data from 2012 generated with incorrect command states (from Chandra.cmd_states), prior to https://github.com/sot/cmd_states/pull/31. E.g.

In [10]: cs = Table(fetch_states('2012:003', '2012:004', vals=['vid_board']))                                                                                                                               

In [11]: ks = kadi_states.get_states('2012:003', '2012:004', state_keys=['vid_board'])                                                                                                                      

In [12]: cs                                                                                                                                                                                                 
Out[12]: 
<Table length=7>
      datestart              datestop           tstart        tstop     vid_board
        str21                 str21            float64       float64      int64  
--------------------- --------------------- ------------- ------------- ---------
2012:002:15:18:42.648 2012:003:13:06:26.581 441904788.832 441983252.765         1
2012:003:13:06:26.581 2012:003:13:06:50.581 441983252.765 441983276.765         1
2012:003:13:06:50.581 2012:003:16:21:41.716 441983276.765   441994967.9         1
2012:003:16:21:41.716 2012:003:16:22:05.716   441994967.9   441994991.9         1
2012:003:16:22:05.716 2012:003:22:31:35.675   441994991.9 442017161.859         1
2012:003:22:31:35.675 2012:003:22:31:59.675 442017161.859 442017185.859         1
2012:003:22:31:59.675 2012:004:12:15:23.675 442017185.859 442066589.859         1

In [13]: ks                                                                                                                                                                                                 
Out[13]: 
<Table length=7>
      datestart              datestop       vid_board trans_keys
        str21                 str21           int64     object  
--------------------- --------------------- --------- ----------
2012:003:00:00:00.000 2012:003:13:06:26.581         1           
2012:003:13:06:26.581 2012:003:13:06:50.581         0  vid_board
2012:003:13:06:50.581 2012:003:16:21:41.716         1  vid_board
2012:003:16:21:41.716 2012:003:16:22:05.716         0  vid_board
2012:003:16:22:05.716 2012:003:22:31:35.675         1  vid_board
2012:003:22:31:35.675 2012:003:22:31:59.675         0  vid_board
2012:003:22:31:59.675 2012:004:00:00:00.000         1  vid_board

This PR puts new reference data into the tests using commands / telemetry from 2019 and 2020. In particular it uses Chandra.cmd_states as the standard, prior to #88 which migrates to using kadi.

Testing

taldcroft commented 4 years ago

@jzuhone - I've merged this into the shiny branch, but please confirm that you concur the kadi version of states (with vid_board toggling) is correct, not the Chandra.cmd_states version.

jzuhone commented 4 years ago

@taldcroft this looks correct to me.