Skip to content

Commit b424085

Browse files
committed
Firefly-116:
minor change on checking the undefied field of "mijMatrixKeyRoot" variable
1 parent b18a737 commit b424085

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/firefly/js/visualize/projection/WavelengthHeaderParser.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function parseWavelengthHeaderInfo(header, altWcs='', zeroHeader, wlTable
99
const parse= makeDoubleHeaderParse(header, zeroHeader, altWcs);
1010
const which= altWcs?'1':getWCSAXES(parse);
1111
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
1213
return calculateWavelengthParams(parse,altWcs,which,mijMatrixKeyRoot, wlTable);
1314
}
1415

@@ -212,13 +213,13 @@ function calculateWavelengthParams(parse, altWcs, which, pc_3j_key,wlTable) {
212213

213214
//Plot and display the wavelength as one of the mouse readout only if the FITs header
214215
//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:
216217
* 1. Algorithm is not defined
217218
* 2. wlType is not defined or the type is not supported
218219
* 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+
*
220221
*/
221-
if (!algorithm || !wlType || !isWL || !pc_3j_key) return;
222+
if (!algorithm || !wlType || !isWL) return;
222223

223224

224225
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

Comments
 (0)