This repository has been archived by the owner on Jul 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from robelgeda/master
Cutout Tool and Flag+Comment Boxes
- Loading branch information
Showing
8 changed files
with
1,586 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>MainWindow</class> | ||
<widget class="QMainWindow" name="MainWindow"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>621</width> | ||
<height>470</height> | ||
</rect> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>621</width> | ||
<height>470</height> | ||
</size> | ||
</property> | ||
<property name="maximumSize"> | ||
<size> | ||
<width>621</width> | ||
<height>470</height> | ||
</size> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>MainWindow</string> | ||
</property> | ||
<widget class="QWidget" name="centralwidget"> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="3" column="1" colspan="4"> | ||
<widget class="QLineEdit" name="inImage"/> | ||
</item> | ||
<item row="6" column="1"> | ||
<widget class="QLabel" name="label_6"> | ||
<property name="text"> | ||
<string>X:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="3"> | ||
<widget class="QLabel" name="label_5"> | ||
<property name="text"> | ||
<string>Y:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="0"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string> Path to Image:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="0"> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string> Cutout size in arcsec:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="0"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="text"> | ||
<string> Save cutouts at:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1" colspan="4"> | ||
<widget class="QLineEdit" name="inSpectra"/> | ||
</item> | ||
<item row="4" column="1" colspan="4"> | ||
<widget class="QLineEdit" name="inSave"> | ||
<property name="styleSheet"> | ||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="9" column="5"> | ||
<widget class="QPushButton" name="start"> | ||
<property name="text"> | ||
<string>Start</string> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0" colspan="6"> | ||
<widget class="QTextBrowser" name="infoBox"> | ||
<property name="styleSheet"> | ||
<string notr="true">background-color: rgba(255, 255, 255, 203);</string> | ||
</property> | ||
<property name="verticalScrollBarPolicy"> | ||
<enum>Qt::ScrollBarAlwaysOn</enum> | ||
</property> | ||
<property name="lineWrapMode"> | ||
<enum>QTextEdit::FixedPixelWidth</enum> | ||
</property> | ||
<property name="lineWrapColumnOrWidth"> | ||
<number>585</number> | ||
</property> | ||
<property name="html"> | ||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | ||
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> | ||
p, li { white-space: pre-wrap; } | ||
</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> | ||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600; text-decoration: underline;">Cutout Tool for JWST/NIRSpec MSA Programs</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">MOSViz is a quick-look analysis and visualization tool for multi-object spectroscopy (MOS). It is designed to work with JWST and non-JWST data: spectra and it can be used with associated images. MOSViz can display a “postage stamp” image of the source along with the spectra. These images are usually cutouts from larger images. The MOSViz Cutout Tool for JWST/NIRSpec MSA Programs uses information in the headers of NIRSpec spectra files to generate cutouts. MOSViz uses a special catalog called a MOSViz Table to organize file paths and information. The Cutout Tool will generate a MOSViz Table after the cutouts are saved.</p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Inputs</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">NIRSpec spectra directory: </span>This is the path to the NIRSpec MSA post-pipeline spectra. These files are saved in the level3 subdirectory of the pipeline output. The files should follow the following naming scheme:</p> | ||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">&lt;programName&gt;_&lt;objectName&gt;_&lt;instrument_filter&gt;_ &lt;grating&gt;_&lt;s2d|x1d&gt;.fits</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Image:</span> An image to make cutouts from. You can use NIRCam images as well as images from other sources. If a target's coordinates are out of range, that target will not be assigned a cutout. A list of skipped files will be saved in a text file at the save destination.</p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="docs-internal-guid-c8f1413b-5cd0-ce16-af7d-b5b1a747d2df"></a><span style=" font-family:'Arial'; font-weight:600; color:#000000; background-color:transparent;">C</span><span style=" font-family:'Arial'; font-weight:600; color:#000000; background-color:transparent;">utout Size:</span><span style=" font-family:'Arial'; color:#000000; background-color:transparent;"> The size of individual cutouts in arcsec</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; color:#000000;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-weight:600; color:#000000; background-color:transparent;">Save Path (Optional):</span><span style=" font-family:'Arial'; color:#000000; background-color:transparent;"> The Cutout Tool saves a subdirectory of cutouts and a MOSViz Table in the same directory as the spectra files by default. You can change the save destination of these items by clicking the &quot;Change&quot; button. Changing the save destination will generate a MOSViz Table that is unique to your computer (you will not be able to share it).</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; color:#000000;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-weight:600; color:#000000; background-color:transparent;">Outputs</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-weight:600; color:#000000; background-color:transparent;">Cutouts: </span><span style=" font-family:'Arial'; color:#000000; background-color:transparent;">A directory containing cutouts. The cutout images will follow the naming scheme:</span></p> | ||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="docs-internal-guid-c8f1413b-5cd1-dca8-4611-362810d62030"></a><span style=" font-family:'Arial'; font-style:italic; color:#000000; background-color:transparent;">&lt;</span><span style=" font-family:'Arial'; font-style:italic; color:#000000; background-color:transparent;">objectName&gt;_&lt;programName&gt;_cutout.fits</span></p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; color:#000000;"><br /></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-weight:600; color:#000000;">MOSViz Table: </span><span style=" font-family:'Arial'; color:#000000;">A table containing paths to MSA spectra and cutout images. The MOSViz Table file will be saved in ASCII-Ecsv format. You can import this file into glue and visualize your data using MOSViz. Information contained in the MOSViz Table:</span></p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Object ID. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Right Ascension. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Declination. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Path to 1d spectrum file. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Path to 2d spectrum file. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Path to cutout file, “None” otherwise. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Slit width and length. </p> | ||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Pixel scale.</p> | ||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="9" column="1" colspan="4"> | ||
<widget class="QProgressBar" name="progressBar"> | ||
<property name="value"> | ||
<number>24</number> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="2"> | ||
<widget class="QLineEdit" name="xSize"/> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string> Path to spectra directory:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="5"> | ||
<widget class="QPushButton" name="savePathButton"> | ||
<property name="text"> | ||
<string>Change</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="5"> | ||
<widget class="QPushButton" name="imageBrowseButton"> | ||
<property name="text"> | ||
<string>Browse</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="9" column="0"> | ||
<widget class="QLabel" name="label_7"> | ||
<property name="text"> | ||
<string> Progress:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="5"> | ||
<widget class="QPushButton" name="specBrowseButton"> | ||
<property name="text"> | ||
<string>Browse</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="4"> | ||
<widget class="QLineEdit" name="ySize"/> | ||
</item> | ||
<item row="7" column="0"> | ||
<widget class="QCheckBox" name="table_checkBox"> | ||
<property name="text"> | ||
<string>Generate MOSViz Table</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<widget class="QStatusBar" name="statusbar"/> | ||
<widget class="QMenuBar" name="menubar"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>621</width> | ||
<height>22</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
Oops, something went wrong.