WARNING: As of April 2022, active development and maintenance has ceased on this project since it was expected and developed to be used solely during JWST OTE Commissioning which is complete. No further support of this project should be expected.
Please note that MAGIC has only been developed and used on MacOS machines. Any use on a different operating system may result in errors.
The Multi-Application Guiding Interface for Commissioning (MAGIC) package provides convenient access to numerous ancillary tools that will be used, as the name suggests, with the JWST FGS during OTE Commissioning. The package allows for user interaction with commissioning data and creates files that are needed for the operation of the flight software and the execution of visits.
For more details on these tools and how to use them, please see the MAGIC User's Guide.
These tools comprise of four main components that can be run individually or together:
This module will convert a JWST input image (from any NIRCam or FGS detector) to a pseudo-FGS raw image. This pseudo-FGS raw image is not a simulated image, but an expectation of the image that the FGS flight software will see. This module appropriately rotates the image from the science frame if necessary, adjusts the pixel scale and image size if converting from a NIRCam image, corrects bad pixels, and normalizes the image to the magnitude and count rates of a specified guide star.
This module takes in a raw FGS image and allows the user to choose the guide and reference star PSFs using a GUI.
This module creates all the files necessary to test guide and reference star candidates in an FGS raw image, with different flight software simulators. This includes all the files necessary to run the ID, ACQ1, ACQ2, and TRK steps in these simulators.
Allows the user to override the guide star catalog with the selected guide and reference star PSFs that will be used to facilitate guiding on unstacked and/or un-phased PSFs during JWST OTE commissioning.
This package was developed in a Python ≥3.8 environment.
-
$ cd
into the directory where you want to keep the package -
Clone the repository to your local machine (we recommend you have SSH keys set up). If you are on GitHub:
git clone [email protected]:spacetelescope/jwst_magic.git
OR, using GitLab:
git clone [email protected]:JWST-FGS/jwst-magic.git
-
Create a MAGIC-specific environment by navigating to the directory where the
setup.py
file lives in thejwst_magic
package and create a new conda environment, for example named 'magic', from theenvironment.yml
file:conda env create --name magic --file=environment.yml
And activate it:
conda activate magic
-
You will need the
jwst-fgs-countrate
module in order to run MAGIC. Clone the repository to your local machine.git clone [email protected]:spacetelescope/jwst-fgs-countrate.git
-
Install the
jwst-fgs-countrate
package by navigating to the directory where thesetup.py
file lives in thejwst-fgs-countrate
package and installing it usingpip
:cd jwst-fgs-countrate/ pip install -e .
-
Install the
jwst_magic
package by navigating to the directory where thesetup.py
file lives in thejwst_magic
package and installing it usingpip
:cd jwst-magic/ pip install -e .
-
(Optional) In order to run MAGIC fully as intended, you will need to copy a set of proprietary files to your local repository. If you feel you should have access to these files, reach out to the current maintainer of this code for more information. MAGIC can still be run without these files, but not all files will be written out and some of image files may be missing some of the expected noise components.
The jwst_magic
package installation process will also check for the following package dependencies, and automatically install them using pip if they are not found:
astropy
jwst
matplotlib
numpy
pandas
photutils
PyQt5
pysiaf
pytest
pyyaml
requests
scipy
These tools are best run in the IPython
terminal, in the conda environment where you have installed jwst_magic
. Activate your environment, and launch the GUI with the following steps:
In[1]: import jwst_magic
In[2]: jwst_magic.run_tool_GUI()
If you see the print out Warning: Cannot check for newest reference files.
, there are a few possible issues:
- You may not be connected to the internet
- You may have a problem with your CRDS cache, in which case:
- Delete your CRDS cache directory (in your /home directory)
- Re-import MAGIC in a new
IPython
session (which will re-download your cache)
As with all software packages, there are several known issues for MAGIC. A current list of known issues is availablehere.
For the full documentation, including step-by-step directions for using this package, see the MAGIC User's Guide.
WARNING: No further development of this project is expected. This section remains solely for completeness.
There are two pages to review before you begin contributing to the jwst_magic
package.
The first is our style guide and the second is our suggested git workflow page, which contains an in-depth explanation of the workflow.
The following is an example of a best work flow for contributing to the project
(adapted from the spacetelescope
jwql
contribution guidelines):
- Create a branch off of the
jwst_magic
repository using the JIRA issue name plus a short description of the issue (e.g.JWSTFGS-375-fix-fgs-image-conversion
) - Make your software changes.
- Push that branch to your personal GitHub repository (i.e. origin).
- On the
jwst_magic
repository, create a pull request that merges the branch intojwst_magic:main
. - Assign a reviewer from the team for the pull request.
- Iterate with the reviewer over any needed changes until the reviewer accepts and merges your branch.
- Delete your local copy of your branch.
WARNING: No further development of this project is expected. This section remains solely for completeness.
This repository follows the principles of "Semantic Versioning", such that
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
When releasing a new version, developers should change the version number in setup.py
, merge this change in a PR, and then release the package via the GitHub interface.
WARNING: No further development of this project is expected. This section remains solely for completeness.
Users and contributors to jwst_magic
should adhere to the Code of Conduct.
Any issues or violations pertaining to the Code of Conduct should be brought to the attention of a MAGIC team member listed below.
No further development of this project is expected, so no support will be given to future questions. We encourage you to look to the documentation for answers.
- Shannon Osborne (GitHub: @shanosborne)
- Keira Brooks (GitHub: @kjbrooks)
- Sherie Holfeltz (GitHub: @stholfeltz)
- Lauren Chambers (GitHub: @laurenmarietta)
- Kathryn St. Laurent