sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Adding a new item to kadi? #160

Closed jzuhone closed 4 years ago

jzuhone commented 4 years ago

I'd like to add the ACIS Focal Plane cooling tests to kadi:

https://cxc.cfa.harvard.edu/acis/FP_cooling/index.html

Is there a good example of what I would need to do?

jeanconn commented 4 years ago

Hi @jzuhone! I've forgotten the details about why it isn't in there already. Do we have eng archive telemetry that makes it plain when there's a FP cooling test?

jzuhone commented 4 years ago

@jeanconn not really, the temperature just drops considerably below the norm, but this wouldn't be enough, because we also want to track when we put the setpoint higher as well for collecting calibration data at high temperature.

taldcroft commented 4 years ago

@jzuhone - look in kadi/events/models.py for class LttBad. This is subclass that allows just reading an ASCII table that is sitting somewhere on disk. So if you have such a file sitting anywhere on the HEAD LAN that would work. The primary kadi ingest happens only on the HEAD network so portability is not a concern here as long as ACIS maintains the file.

taldcroft commented 4 years ago

It is worth noting that LttBad seemed like a good idea at the time, but in practice is not being maintained. So that is a cautionary tale of building in obscure dependencies. But as long as ACIS ops establishes (maybe procedurally as part of the cooling test process) that the source file needs to be updated, then kadi will follow along and keep an accurate product.

taldcroft commented 4 years ago

@jzuhone - would you consider this closed by #161 which will provide the ACIS FP setpoint as a dynamic commanded state? There would be an open issue to include non-load instances of WSFTNEG*, though I'm not sure of priority. My guess is that for most thermal modeling the commanded (from loads) cooling tests cover most of the cases of interest, but that is just a guess.

taldcroft commented 4 years ago

There is a key point that might not yet be obvious, but with #161 and https://github.com/sot/eng_archive/pull/191, you will be able to make a xija thermal model that references an MSID cmd_state_acisfp_temp_32 and that will magically behave as if the commanded ACIS focal temperature setpoint is coming down in telemetry via cheta once each major frame. :rocket:

jzuhone commented 4 years ago

Thanks @taldcroft! I was going to dive into this myself but it looks like you were sufficiently interested to tackle it yourself. I'll be commenting on the PRs later today.