Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annihilate BINNING header keyword -- And general header cleanup #8

Open
dsand opened this issue Apr 6, 2022 · 3 comments
Open

Annihilate BINNING header keyword -- And general header cleanup #8

dsand opened this issue Apr 6, 2022 · 3 comments
Assignees

Comments

@dsand
Copy link

dsand commented Apr 6, 2022

One thing we are noticing on April 4-7 science run. Some header keywords are clearly wrong. For instance, the BINNING header keyword is always '3x3 '. Even when the actual binning is 4x4 or something else. The correct header keywords are getting propagated to CCDSUM and CCDBIN1 and CCDBIN2. We should just get rid of this binning header keyword, or at the very least fix it.

This should probably be part of a larger clean up of the RTS2 populated headers.

Note that this bad BINNING keyword gets propagated to things like @pndaly 's observing log on AORP. So there are downstream affects that aren't great.

@pndaly
Copy link

pndaly commented Apr 8, 2022

OK, I took a look at this and I developed some code for a fix. I copied the object sub-directories of 20220406 and run
it against that. It seemed to fix all 414 images and it was very quick to run:

% diff fix_primary_hdu.before.dat fix_primary_hdu.after.dat -y
BINNING = '3x3 ' / Binning | BINNING = '4x4 ' / Binning

If you want to see the code, it's on scopenet in /home/pndaly/fix_primary_hdu.py.

I can fix your data (if you wish) but a larger project would be to fix all data on bigartn and scopenet (as I think this has been happening for some time).

However, we don't want to be fixing fits headers after the fact ... it'd be better to get them right first time. So, whilst fixing
another issue (the /etc/rts2 files -> repo thing) I noticed the file /etc/rts2/fitstemplate.ini ... I think we should be able to add a line in there like:

BINNING = @C0.binning / ARN-ORP binning

I also spotted a problem: the ObsReq2 table removed the GroupID so that header is blank. It was that information that
was going to be used bind images in, for example, a dither (as they'd all have the same GroupID).

@dsand
Copy link
Author

dsand commented Apr 8, 2022

Nice. Thanks @pndaly. I don't think we should be fixing old headers, but we should either fix or remove this header keyword. It is redundant with CCDSUM & CCDBIN1, CCDBIN2 which are all reading correctly.

Thanks for finding where the fits template is. I'll try to add an issue to the relevant repo.

Also, what/where is the ObsReq2 table? What piece of code needs to be debugged there?

Thanks.

@pndaly
Copy link

pndaly commented May 17, 2022

Looks like adding 'BINNING = @C0.binning / Binning' to the /etc/rts2/fitstemplate.ini fixes that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants