Skip to content

Commit bfdceab

Browse files
fix miri orientation
1 parent d76a505 commit bfdceab

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

pandexo/engine/justplotit.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,20 @@ def jwst_2d_det(result_dict, plot=True, output_file='det2d.html'):
548548
out = result_dict['PandeiaOutTrans']
549549
data = out['2d']['detector']
550550

551+
if 'miri' in result_dict['input']['Instrument']:
552+
width=300
553+
height=800
554+
else:
555+
width=800
556+
height=300
551557

552558
xr, yr = data.shape
553559

554560
plot_detector_2d = Figure(tools="pan,wheel_zoom,box_zoom,reset,hover,save",
555561
x_range=[0, yr], y_range=[0, xr],
556562
x_axis_label='Pixel', y_axis_label='Spatial',
557563
title="2D Detector Image",
558-
width=800, height=300)
564+
width=width, height=height)
559565

560566
plot_detector_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
561567
palette="Spectral11")
@@ -593,11 +599,19 @@ def jwst_2d_sat(result_dict, plot=True, output_file='sat2d.html'):
593599
out = result_dict['PandeiaOutTrans']
594600
data = out['2d']['saturation']
595601
xr, yr = data.shape
602+
603+
if 'miri' in result_dict['input']['Instrument']:
604+
width=300
605+
height=800
606+
else:
607+
width=800
608+
height=300
609+
596610
plot_sat_2d = Figure(tools=TOOLS,
597611
x_range=[0, yr], y_range=[0, xr],
598612
x_axis_label='Pixel', y_axis_label='Spatial',
599613
title="Saturation",
600-
width=800, height=300)
614+
width=width, height=height)
601615

602616
plot_sat_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
603617
palette="Spectral11")

pandexo/engine/utils/plotters.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,18 @@ def create_component_jwst(result_dict):
367367

368368
xr, yr = data.shape
369369

370+
if 'miri' in result_dict['input']['Instrument']:
371+
width=300
372+
height=800
373+
else:
374+
width=800
375+
height=300
376+
370377
plot_detector_2d = Figure(tools="pan,wheel_zoom,box_zoom,reset,hover,save",
371378
x_range=[0, yr], y_range=[0, xr],
372379
x_axis_label='Pixel', y_axis_label='Spatial',
373380
title="2D Detector Image",
374-
width=800, height=300)
381+
width=width, height=height)
375382

376383
plot_detector_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
377384
palette="Spectral11")
@@ -387,7 +394,7 @@ def create_component_jwst(result_dict):
387394
x_range=[0, yr], y_range=[0, xr],
388395
x_axis_label='Pixel', y_axis_label='Spatial',
389396
title="Signal-to-Noise Ratio",
390-
width=800, height=300)
397+
width=width, height=height)
391398

392399
plot_snr_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
393400
palette="Spectral11")
@@ -402,7 +409,7 @@ def create_component_jwst(result_dict):
402409
x_range=[0, yr], y_range=[0, xr],
403410
x_axis_label='Pixel', y_axis_label='Spatial',
404411
title="Saturation",
405-
width=800, height=300)
412+
width=width, height=height)
406413

407414
plot_sat_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
408415
palette="Spectral11")

0 commit comments

Comments
 (0)