Skip to content

Mask flip changes#1

Open
lyalcorn wants to merge 3 commits intojoshwalawender:masterfrom
lyalcorn:mask_flip_changes
Open

Mask flip changes#1
lyalcorn wants to merge 3 commits intojoshwalawender:masterfrom
lyalcorn:mask_flip_changes

Conversation

@lyalcorn
Copy link
Copy Markdown

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