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

Standardize Formatting of Simulated Fits Images #158

Open
coleslenkovich opened this issue Apr 12, 2022 · 3 comments
Open

Standardize Formatting of Simulated Fits Images #158

coleslenkovich opened this issue Apr 12, 2022 · 3 comments
Assignees

Comments

@coleslenkovich
Copy link
Contributor

Fix Simulated Data Output to Better Model HDUL Format From LCO
Our current simulated images put all information into the primary HDU of the fits file. We should restructure how this data is stored into the files such that the HDUL models that of the data we receive from LCO. This should help limit issues with future updates to the pipeline, since the data should be treated in the same way LCO data is.

LCO Model and Simulated Equivalent

LCO data is formatted into 4 different HDU's with different data stored in each. The functionality of each HDU is listed below, along with what the simulated substitute should be.

HDU LCO Data Simulated equivalent
PRIMARY an empty PrimaryHDU an empty PrimaryHDU
SCI An ImageHDU containing image data (pixel values) and headers (telescope parameters, dates, etc) An ImageHDU containing image data and headers given by configuration file
CAT A BinTableHDU catalogue given by LCO detailing sources found by LCO processing A BinTableHDU listing all simulated sources (#, X, Y, Mag, Transient?) from the .list file
BPM An ImageHDU containing the Bad Pixel Mask used by LCO for images (usually empty) Does not need to be added at the moment (not used at all in our pipeline)

Process
There does not seem to be a way to simulate the images with the above mentioned format directly from STARMAKER (The simulation tool we are using). Therefore, header must be modified after the original simulation is done by taking data from the PrimaryHDU and redistributing it into the different HDUs. We should start by saving the data to a separate file to make sure that we are not losing data, and once we are certain it works, start overwriting the files into once process to save space and confusion.

Additional Notes
Once we get code to accomplish this formatting of the HDUs we need to run it on all important simulated data that has already been run in addition to upcoming simulations.

@coleslenkovich coleslenkovich self-assigned this Apr 12, 2022
@coleslenkovich
Copy link
Contributor Author

I have created code that will reformat previously constructed simulated images into the LCO format. Currently working on getting this set up for future images.

@JasperWebb
Copy link
Contributor

Awesome. This looks really good. Can you share a folder containing pre and post fix files?
Let me know if you have any more questions.

@PK0207
Copy link
Contributor

PK0207 commented Apr 18, 2022

Would the code be applicable to standardizing any image input?

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