Skip to content

Commit a2201bd

Browse files
committed
Bug Fix: default the values of CD matrix to cdelt1/2 if defined
- CD1_1 or CD001001 default to CDELT1 or 0 - CD2_2 or CD002002 default to CDELT2 or 0
1 parent 6dd4fd7 commit a2201bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firefly/js/visualize/projection/ProjectionHeaderParser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ export function parseSpacialHeaderInfo(header, altWcs='', zeroHeader) {
197197
}
198198

199199

200-
p.cd1_1= getHeaderListD(parse, ['CD1_1','CD001001'], 0, altWcs);
200+
p.cd1_1= getHeaderListD(parse, ['CD1_1','CD001001'], p.cdelt1??0, altWcs);
201201
p.cd1_2= getHeaderListD(parse, ['CD1_2','CD001002'], 0, altWcs);
202202
p.cd2_1= getHeaderListD(parse, ['CD2_1','CD002001'], 0, altWcs);
203-
p.cd2_2= getHeaderListD(parse, ['CD2_2','CD002002'], 0, altWcs);
203+
p.cd2_2= getHeaderListD(parse, ['CD2_2','CD002002'], p.cdelt2??0, altWcs);
204204

205205
p.pc1_1 = parse.getDoubleValue('PC1_1'+altWcs, undefined);
206206
p.pc1_2 = parse.getDoubleValue('PC1_2'+altWcs, undefined);

0 commit comments

Comments
 (0)