@@ -9,6 +9,7 @@ export function parseWavelengthHeaderInfo(header, altWcs='', zeroHeader, wlTable
9
9
const parse = makeDoubleHeaderParse ( header , zeroHeader , altWcs ) ;
10
10
const which = altWcs ?'1' :getWCSAXES ( parse ) ;
11
11
const mijMatrixKeyRoot = getPC_ijKey ( parse , which ) ;
12
+ if ( ! mijMatrixKeyRoot ) return ; //When both PC i_j and CD i_j are present, we don't show the wavelength
12
13
return calculateWavelengthParams ( parse , altWcs , which , mijMatrixKeyRoot , wlTable ) ;
13
14
}
14
15
@@ -212,13 +213,13 @@ function calculateWavelengthParams(parse, altWcs, which, pc_3j_key,wlTable) {
212
213
213
214
//Plot and display the wavelength as one of the mouse readout only if the FITs header
214
215
//contains the required parameters and the wavelength is depending on the image axes.
215
- /* We don't show the wavelength in the mouse readout in following four situations:
216
+ /* We don't show the wavelength in the mouse readout in following three situations:
216
217
* 1. Algorithm is not defined
217
218
* 2. wlType is not defined or the type is not supported
218
219
* 3. The FITs file is not wavelength type (may be plane)
219
- * 4. It has both PC_ij and CD_ij, thus, we don't know which parameters to use
220
+ *
220
221
*/
221
- if ( ! algorithm || ! wlType || ! isWL || ! pc_3j_key ) return ;
222
+ if ( ! algorithm || ! wlType || ! isWL ) return ;
222
223
223
224
224
225
if ( algorithm === LOG ) { //the values in CRPIXk and CDi_j (PC_i_j) are log based on 10 rather than natural log, so a factor is needed.
0 commit comments