Skip to content

new flat mockups#90

Draft
rgcosentino wants to merge 2 commits intospacetelescope:mainfrom
rgcosentino:p_L_flat_mockup_rgc
Draft

new flat mockups#90
rgcosentino wants to merge 2 commits intospacetelescope:mainfrom
rgcosentino:p_L_flat_mockup_rgc

Conversation

@rgcosentino
Copy link
Copy Markdown
Collaborator

This is a mock-up for how we could do both pixel level and large scale flats in the RFP

Provided separate classes for each type of flat with a base class flat that would combine the different products to deliver a combined product to CRDS.

… per conversations with cal block Stefano and Tim and Rachael
@rgcosentino
Copy link
Copy Markdown
Collaborator Author

I still want to add a few more details here but this is a crude and not polished to pseudo code flat workflow. Still need to:

  • update a dev script and make files
  • try to instantiate classes with simulated data
  • combine class Flat.py test

@BradleySappington to give you an idea here. There are two different flat components that will be derived. One is the Large scale flat from all 18 detectors at the same time looking at a flattened sky. And then there is the Pixel scale flat which is what we originally had. There is only a data model and a flattened correction for Flat or FLAT or ref_type = FLAT that is the combination of these two components.

Imagining we could make each component separately and store the Large flats on the repo, or deliver p-flats at a high cadence, I decided to mock up meta data for us to treat the components like their own files. This would allow us to populate meta data for different products and trace delivery and monitor with RDMT let's say.

Feedback welcome.

@fjaviersanchez
Copy link
Copy Markdown
Contributor

The code looks good. What I am not sure is if we will end up having two different files or a single file with different data blocks for the different components. Any thoughts?

@rgcosentino
Copy link
Copy Markdown
Collaborator Author

What I think we should do now is a workflow like this

  • assume the L flat wont be changing much and let's store on github directly in a data directory for flat with a file name like roman_large_flat_{optical_element}_wfi{XX}.asdf
  • we could go 4088x4088 right now but let's just do 100x100 for the large flat files
  • every time we get new flat data, we put that into the flat pipeline which class PixelFlat() to generate the p_flat object image 4088x4088
  • then Flat() knows which detector and optical element in the pipeline run that the PixelFlat was generated for and gets the corresponding Large flat file, opens it, combines and makes the flat reference file with the combined product
  • right now I have the separate components added to the data model just to show and demonstrate we can do this

What do you think @fjaviersanchez

Copy link
Copy Markdown
Collaborator

@BradleySappington BradleySappington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theory here is good, so each instance of this is a single pflat and lflat combined?

# 2. Apply L-flat correction assuming multiplicative
# 3. Normalize

wfi_fov_p_flat = self._assemble_detector_grid(self.pflat_list)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this getting instantiated?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? wfi_fov_p_flat? or the method _assemble_detector()? A lot of this is TBD so internal methods like this could all be changed or not needed as drafted.

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

Successfully merging this pull request may close these issues.

4 participants