Skip to content

Commit

Permalink
Merge pull request #62 from shanosborne/for-wftp9
Browse files Browse the repository at this point in the history
Updates for WFTP9
  • Loading branch information
shanosborne authored Dec 2, 2020
2 parents b06ab93 + d08407a commit fb2031e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Multi-Application Guiding Interface for Commissioning (MAGIC)

[![PyPI - License](https://img.shields.io/pypi/l/Django.svg)](https://github.com/spacetelescope/jwql/blob/master/LICENSE)
[![Python](https://img.shields.io/badge/Python-3.6%20%7C%203.6%20%7C%203.7-blue.svg)](https://www.python.org/)
[![Python](https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://www.python.org/)
[![STScI](https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat)](http://www.stsci.edu)
[![Build Status](https://ssbjenkins.stsci.edu/job/STScI/job/jwst_magic/job/master/badge/icon)](https://ssbjenkins.stsci.edu/job/STScI/job/jwst_magic/job/master/)

Expand Down
Binary file modified docs/magic_user_guide/figs/figure_q_acq_star_catalog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 9 additions & 18 deletions jwst_magic/masterGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def run_tool(self):
in_file = [self.comboBox_regfileStarSelector.itemText(i) for i in
range(self.comboBox_regfileStarSelector.count())]

if len(in_file) == 0:
if len(in_file) == 0 and not self.groupBox_segmentGuiding.isChecked():
raise ValueError('"Load Unshifted Data from File" option chosen for Star Selector section, '
'but no files were chosen. Either choose files to be loaded or switch to the '
'Click-to-Select GUI option.')
Expand Down Expand Up @@ -556,17 +556,15 @@ def run_tool(self):
if self.radioButton_shifted.isChecked():
guiding_files = self.shifted_guiding_selections_file_list
all_psf_files = self.shifted_all_found_psfs_file_list
center_pointing_files = [os.path.join(out_dir, 'out/', root, 'guiding_config_' + \
i.split('/guiding_config_')[-1].split('/')[0],
'shifted_center_pointing_{}_G{}_config{}.txt'.format(root,
guider, i.split('/guiding_config_')[-1].split('/')[0]))
for i in self.shifted_guiding_selections_file_list]
center_pointing_files = [file.replace('guiding_selections', 'center_pointing')
for file in self.shifted_guiding_selections_file_list]
else:
guiding_files = self.guiding_selections_file_list
all_psf_files = [self.all_found_psfs_file] * len(guiding_files)
center_pointing_files = [os.path.join(out_dir, 'out/', root,
'center_pointing_{}_G{}.txt'.format(root, guider))] * \
len(guiding_files)
center_pointing_files = [self.all_found_psfs_file.replace('unshifted_all_found_psfs_',
'center_pointing_')] * len(guiding_files)

LOGGER.info('Pulling center of pointing information from same location as guiding files')

# Load selected guiding_selections*.txt
if len(self.comboBox_guidingcommands.checkedItems()) == 0:
Expand Down Expand Up @@ -833,12 +831,6 @@ def update_segment_guiding_shift(self):
"""This gets triggered when you select the segment guiding
box or when you click one of the id attitude radio buttons"""
if self.groupBox_segmentGuiding.isChecked():
if len(self.shifted_im_file_list) != 0:
self.radioButton_shifted.setEnabled(False not in
[os.path.exists(path) for path in self.shifted_im_file_list])
else:
self.radioButton_shifted.setEnabled(False)

if self.radioButton_name_manual.isChecked():
root_dir = os.path.join(self.textEdit_out.toPlainText(), 'out', self.lineEdit_root.text())
else:
Expand Down Expand Up @@ -1519,9 +1511,8 @@ def update_shifted_image_preview(self):

self.textEdit_showingShifted.setEnabled(False)

# Disable the "use shifted image" buttons
# Uncheck the "use shifted image" button
self.radioButton_unshifted.setChecked(True)
self.radioButton_shifted.setEnabled(False)

# Disable the "show stars" button
self.checkBox_showStars_shifted.setEnabled(False)
Expand Down Expand Up @@ -1645,7 +1636,7 @@ def update_filepreview(self, new_guiding_selections=False):
self.update_guiding_selections(new_selections=new_selections)
else:
self.comboBox_regfileStarSelector.clear()
self.lineEdit_regfileSegmentGuiding.setText("")
self.lineEdit_regfileSegmentGuiding.setText(root_dir)
self.comboBox_guidingcommands.clear()

# If possible, show converted and shifted image previews, too
Expand Down

0 comments on commit fb2031e

Please sign in to comment.