realfastvla / realfast

Real-time interferometric data analysis for the VLA
http://realfast.io
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Annotations table in SDMs #72

Open demorest opened 5 years ago

demorest commented 5 years ago

Hi @caseyjlaw I've implemented the ability to pass annotation (candidate metadata) info via SDMBuilder. This is on the annotation branch right now. SDMBuilder now takes three new arguments:

  1. annotation is a dict of whatever we want that will be JSON-ified and sent to MCAF. I think we need to stick to the fields defined in that earlier discussion though. Getting the right info available here will mean we need changes to the makesdm() function and maybe other stuff upstream, I have not done any of this yet.
  2. There is a new arg outputDatasetId that can be used to specify the name of the output SDM that MCAF writes. Right now it looks like there is code in createproducts() that renames the SDMs, this should probably be removed and we just send the desired name to MCAF.
  3. Finally, there is calScanNumber which is supposed to be the scan number of the telcal solution used. But MCAF does not do anything with this yet, and as discussed earlier it's probably easier for us to pass a time. So we'll need to discuss that change with Rich when he is back.

I did some quick tests and it seems to work, but you should check this all out also.

demorest commented 5 years ago

Also I noticed one possible bug inside makesdm() while doing this. The dataSize field is computed from the data array nbytes attribute. I'm pretty sure this size refers to the size of the BDF file, not the size of the data array. Not sure how much this matters but it is possible either the archive or CASA will pay attention to it.

caseyjlaw commented 5 years ago

Ok, I've made some edits to integrate this more fully. Pushed to the annotation branch. Have not fixed that bug, but welcome ideas.