-
Notifications
You must be signed in to change notification settings - Fork 3
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 #116 from LCOGT/feature/filter-readout-mode-warning
Add alert and check for sinistro filter/readout mode combinations
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 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 |
---|---|---|
|
@@ -75,6 +75,10 @@ | |
@input="update" | ||
/> | ||
<!-- End of MUSCAT instrument specific fields --> | ||
<b-alert variant="warning" :show="badFilterReadoutMode"> | ||
<strong>Warning:</strong> This filter/readout mode combination is not eligible for automatic reduction. <br><br> | ||
Please contact <a href="mailto:[email protected]">science support</a> if this combination is required. | ||
</b-alert> | ||
<ocs-custom-select | ||
v-model="instrumentConfig.mode" | ||
field="readout_mode" | ||
|
@@ -151,6 +155,7 @@ | |
<script> | ||
import { toRef } from '@vue/composition-api'; | ||
import { OCSComposable, OCSUtil } from 'ocs-component-lib'; | ||
import _ from 'lodash'; | ||
import { lampFlatDefaultExposureTime, arcDefaultExposureTime } from '@/utils'; | ||
|
@@ -249,7 +254,8 @@ export default { | |
{ value: 'SYNCHRONOUS', text: 'Synchronous' }, | ||
{ value: 'ASYNCHRONOUS', text: 'Asynchronous' } | ||
] | ||
} | ||
}, | ||
badFilterReadoutMode: false | ||
}; | ||
}, | ||
computed: { | ||
|
@@ -273,6 +279,26 @@ export default { | |
} | ||
}, | ||
watch: { | ||
'instrumentConfig.optical_elements.filter': function(value) { | ||
this.badFilterReadoutMode = false; | ||
if (this.selectedInstrument === '1M0-SCICAM-SINISTRO') { | ||
if (this.instrumentConfig.mode === 'central_2k_2x2') { | ||
if (_.includes(['u', 'b', 'v', 'r', 'i'], value)) { | ||
this.badFilterReadoutMode = true; | ||
} | ||
} | ||
} | ||
}, | ||
'instrumentConfig.mode': function(value) { | ||
this.badFilterReadoutMode = false; | ||
if (this.selectedInstrument === '1M0-SCICAM-SINISTRO') { | ||
if (value === 'central_2k_2x2') { | ||
if (_.includes(['u', 'b', 'v', 'r', 'i'], this.instrumentConfig.optical_elements.filter)) { | ||
this.badFilterReadoutMode = true; | ||
} | ||
} | ||
} | ||
}, | ||
'instrumentConfig.exposure_time': function(value) { | ||
if (this.selectedInstrument === 'SOAR_TRIPLESPEC') { | ||
if (value < 7.0) { | ||
|