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

Mask flip changes #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lyalcorn
Copy link

Due to issues with the double images produced when the FCS system is toward the edges of its range, we have added functionality to produce a MAGMA CSU masks that has been flipped 180 degrees from its original sky PA to reduce the range of the FCS when needed. Two major changes to the MOSFIRE code have been made:

  1. mosfire/mask.py - the function read_xml has been modified to read in additional elements in mascgenArguments that are used in MAGMA in mask generation. This includes input parameters 'center' and 'steps', and output parameters 'directory' and 'maskScript'. In order to produce a new mask that MAGMA can open, these parameters must be defined.
  2. flip_CSU_mask_180.py - this script uses mosfire packages to read in a .xml CSU mask file produced by magma, flip the mask 180 degrees from its original PA, and then recover the positions of the mechanical slits, science targets, and alignment stars with this flip.
    This script has been tested on my local machine with various MAGMA masks and runs without errors, duplicating the input mask with this PA flip, and is indistinguishable from a flipped mask made with MAGMA. It produces a new mask in a specified directory (default is in the directory in which the script is run './') of the name {mask_original_name}_180flip.xml.

The call is:
python flip_CSU_mask_180.py {csu_maskname}.xml {output_directory}

Additional testing will be done on observer masks for funsies.
Formal testing on mosdev recommended as a next step.

Update read_mask_xml to read in child objects within maskgenArguments (referred to as "grandchildren") necessary to create a mask that reads into MAGMA
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.

1 participant