Skip to content

Commit 4e74dca

Browse files
Merge pull request #81 from natashabatalha/dev
Stage PandExo 3 Update
2 parents 8011eda + bfdceab commit 4e74dca

File tree

9 files changed

+96
-27
lines changed

9 files changed

+96
-27
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# General information about the project.
5151
project = u'PandExo'
52-
copyright = u'2016, Natasha Batalha;Kevin Stevenson'
52+
copyright = u'Updated 2022'
5353

5454
# The version info for the project you're documenting, acts as replacement for
5555
# |version| and |release|, also used in various other places throughout the

docs/installation.rst

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,31 @@ PandExo requires downloading **three folders**: 1) JWST instrument info, 2) stel
1111

1212
JWST Reference Data
1313
````````````````````
14-
JWST Reference data has been updated to 2.0!
14+
JWST Reference data has been updated to 3.0!
1515

1616
.. warning::
17-
Reference data for PandExo/Pandeia 1.X is not compatible with PandExo/Pandeia 2.0. Please always ensure that your reference data is up to date with the software (e.g. reference data 2.0 should match software release 2.0)
17+
Reference data must match the software version. For example Pandeia reference data 3.0 should match Pandeia verions software release 3.0, and that should match PandExo 3.0)
1818

19-
The new reference data is located `here for v2p0 <https://stsci.app.box.com/v/pandeia-refdata-v2p0-jwst>`_. More information on `pandeia installation can be found here <https://outerspace.stsci.edu/display/PEN/Pandeia+Engine+Installation>`_
19+
The new reference data is located `here for v3p0 <https://stsci.app.box.com/v/pandeia-refdata-v3p0-jwst>`_. More information on `pandeia installation can be found here <https://outerspace.stsci.edu/display/PEN/Pandeia+Engine+Installation>`_
2020

2121

2222
After you have downloaded the reference data, create environment variable (`more resources on how to create environment variables are located here <https://natashabatalha.github.io/picaso/installation.html#create-environment-variable>`_).
2323

24+
You can verify your installation by opening up a terminal with access to the conda installation, and type
25+
26+
.. code-block:: bash
27+
28+
python -c "import pandeia.engine; pandeia.engine.pandeia_version()"
29+
30+
If properly installed and configured, it should show the refdata version and synphot data directory, like this:
31+
32+
.. code-block:: bash
33+
34+
Pandeia Engine version: 3.0
35+
Pandeia RefData version: 3.0
36+
Pysynphot Data: /your/data/directory/synphot
37+
38+
2439
.. code-block:: bash
2540
2641
echo 'export pandeia_refdata="$USRDIR/pandeia_data"' >>~/.bash_profile
@@ -41,7 +56,7 @@ Create your environment variable:
4156
4257
Normalization Files
4358
````````````````````
44-
New to PandExo 2.0, **users now have to download the master table of all pysynphot throughput tables.**
59+
New to PandExo >2.0, **users now have to download the master table of all pysynphot throughput tables.**
4560

4661
`Download the file here <https://archive.stsci.edu/hlsps/reference-atlases/hlsp_reference-atlases_hst_multi_everything_multi_v11_sed.tar>`_
4762

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/reference/miri_input.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@
66
"target": true,
77
"position": {
88
"ang_unit": "arcsec",
9-
"xoff": 0.0,
10-
"yoff": 0.0
9+
"x_offset": 0.0,
10+
"y_offset": 0.0
11+
},
12+
"shape":{
13+
"geometry": "point"
1114
},
1215
"spectrum": {
16+
"extinction": {
17+
"bandpass": "j",
18+
"law": "mw_rv_31",
19+
"unit": "mag",
20+
"value": 0.0
21+
},
1322
"normalization": {
1423
"type": "none"},
1524
"sed": {

pandexo/engine/reference/nircam_input.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
"target": true,
66
"position": {
77
"ang_unit": "arcsec",
8-
"xoff": 0.0,
9-
"yoff": 0.0
8+
"x_offset": 0.0,
9+
"y_offset": 0.0
10+
},
11+
"shape": {
12+
"geometry": "point"
1013
},
1114
"spectrum": {
15+
"extinction": {
16+
"bandpass": "j",
17+
"law": "mw_rv_31",
18+
"unit": "mag",
19+
"value": 0.0
20+
},
1221
"normalization": {
1322
"type": "none"},
1423
"sed": {

pandexo/engine/reference/niriss_input.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
"target": true,
66
"position": {
77
"ang_unit": "arcsec",
8-
"xoff": 0.0,
9-
"yoff": 0.0
8+
"x_offset": 0.0,
9+
"y_offset": 0.0
10+
},
11+
"shape": {
12+
"geometry": "point"
1013
},
1114
"spectrum": {
15+
"extinction": {
16+
"bandpass": "j",
17+
"law": "mw_rv_31",
18+
"unit": "mag",
19+
"value": 0.0
20+
},
1221
"normalization": {
1322
"type": "none"},
1423
"sed": {
@@ -18,7 +27,6 @@
1827
"lines": []
1928
}
2029
}],
21-
2230
"background_level": "medium",
2331
"background":"ecliptic",
2432
"calculation":{
@@ -54,6 +62,7 @@
5462
},
5563
"strategy": {
5664
"method": "soss",
57-
"order":1
65+
"order":1,
66+
"background_subtraction": false
5867
}
5968
}

pandexo/engine/reference/nirspec_input.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
"target": true,
66
"position": {
77
"ang_unit": "arcsec",
8-
"xoff": 0.0,
9-
"yoff": 0.0
8+
"x_offset": 0.0,
9+
"y_offset": 0.0
1010
},
11+
"shape": {
12+
"geometry": "point"
13+
},
1114
"spectrum": {
15+
"extinction": {
16+
"bandpass": "j",
17+
"law": "mw_rv_31",
18+
"unit": "mag",
19+
"value": 0.0
20+
},
1221
"normalization": {
1322
"type": "none"},
1423
"sed": {

pandexo/engine/utils/plotters.py

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

386386
xr, yr = data.shape
387387

388+
if 'miri' in result_dict['input']['Instrument']:
389+
width=300
390+
height=800
391+
else:
392+
width=800
393+
height=300
394+
388395
plot_detector_2d = Figure(tools="pan,wheel_zoom,box_zoom,reset,hover,save",
389396
x_range=[0, yr], y_range=[0, xr],
390397
x_axis_label='Pixel', y_axis_label='Spatial',
391398
title="2D Detector Image",
392-
width=800, height=300)
399+
width=width, height=height)
393400

394401
plot_detector_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
395402
palette="Spectral11")
@@ -405,7 +412,7 @@ def create_component_jwst(result_dict):
405412
x_range=[0, yr], y_range=[0, xr],
406413
x_axis_label='Pixel', y_axis_label='Spatial',
407414
title="Signal-to-Noise Ratio",
408-
width=800, height=300)
415+
width=width, height=height)
409416

410417
plot_snr_2d.image(image=[data], x=[0], y=[0], dh=[xr], dw=[yr],
411418
palette="Spectral11")
@@ -420,7 +427,7 @@ def create_component_jwst(result_dict):
420427
x_range=[0, yr], y_range=[0, xr],
421428
x_axis_label='Pixel', y_axis_label='Spatial',
422429
title="Saturation",
423-
width=800, height=300)
430+
width=width, height=height)
424431

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

setup.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,11 @@
4141
# also be placed in the setup.cfg, as will be demonstrated in a future update
4242
# to this sample package.
4343

44-
if sys.version_info < (3,0):
45-
pandas_version = '==0.24.0'
46-
else:
47-
pandas_version = '>=0.25.0'
44+
4845
setup(
4946

5047
name='pandexo.engine',
51-
version='2.0.0',
48+
version='3.0.0',
5249
summary='pandexo transiting exoplanet simulator',
5350
description_file='README.rst',
5451
author='Natasha Batalha at NASA Ames',
@@ -92,11 +89,11 @@
9289
# },
9390

9491
install_requires=[
95-
'pandeia.engine==2.0',
92+
'pandeia.engine==3.0',
9693
'numpy',
9794
'bokeh==3.0.2',
9895
'tornado',
99-
'pandas'+pandas_version,
96+
'pandas',
10097
'joblib',
10198
'photutils',
10299
'astropy',

0 commit comments

Comments
 (0)