From df89f06e3e8c38621df6f101e4b7d51ee7167f94 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 16:19:57 +0000 Subject: [PATCH 1/8] cleaning up order of cells --- spectroscopy/spectra_generator.md | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/spectroscopy/spectra_generator.md b/spectroscopy/spectra_generator.md index 39fa46cd..2105a152 100644 --- a/spectroscopy/spectra_generator.md +++ b/spectroscopy/spectra_generator.md @@ -6,9 +6,9 @@ jupytext: format_version: 0.13 jupytext_version: 1.16.4 kernelspec: - display_name: Python 3 (ipykernel) + display_name: science_demo language: python - name: python3 + name: conda-env-science_demo-py --- # Extract Multi-Wavelength Spectroscopy from Archival Data @@ -84,7 +84,6 @@ Andreas Faisst, Jessica Krick, Shoubaneh Hemmati, Troy Raen, Brigitta Sipőcz, D • Match to HEASARC • Make more efficient (especially MAST searches) - +++ ### Datasets that were considered but didn't end up being used: @@ -99,12 +98,12 @@ Andreas Faisst, Jessica Krick, Shoubaneh Hemmati, Troy Raen, Brigitta Sipőcz, D This cell will install them if needed: -```{code-cell} +```{code-cell} ipython3 # Uncomment the next line to install dependencies if needed. # !pip install -r requirements_spectra_generator.txt ``` -```{code-cell} +```{code-cell} ipython3 import sys import numpy as np import os @@ -133,7 +132,7 @@ from herschel_functions import Herschel_get_spec Here we will define the sample of galaxies. For now, we just enter some "random" coordinates to test the code. -```{code-cell} +```{code-cell} ipython3 coords = [] labels = [] @@ -173,7 +172,7 @@ At this point you may wish to write out your sample to disk and reuse that in fu For the format of the save file, we would suggest to choose from various formats that fully support astropy objects(eg., SkyCoord). One example that works is Enhanced Character-Separated Values or ['ecsv'](https://docs.astropy.org/en/stable/io/ascii/ecsv.html) -```{code-cell} +```{code-cell} ipython3 if not os.path.exists("./data"): os.mkdir("./data") sample_table.write('data/input_sample.ecsv', format='ascii.ecsv', overwrite = True) @@ -183,14 +182,14 @@ sample_table.write('data/input_sample.ecsv', format='ascii.ecsv', overwrite = Tr Do only this step from this section when you have a previously generated sample table -```{code-cell} +```{code-cell} ipython3 sample_table = Table.read('data/input_sample.ecsv', format='ascii.ecsv') ``` ### 1.4 Initialize data structure to hold the spectra Here, we initialize the MultiIndex data structure that will hold the spectra. -```{code-cell} +```{code-cell} ipython3 df_spec = MultiIndexDFObject() ``` @@ -208,16 +207,14 @@ This archive includes spectra taken by • Spitzer/IRS - - -```{code-cell} +```{code-cell} ipython3 %%time ## Get Keck Spectra (COSMOS only) df_spec_DEIMOS = KeckDEIMOS_get_spec(sample_table = sample_table, search_radius_arcsec=1) df_spec.append(df_spec_DEIMOS) ``` -```{code-cell} +```{code-cell} ipython3 %%time ## Get Spitzer IRS Spectra df_spec_IRS = SpitzerIRS_get_spec(sample_table, search_radius_arcsec=1 , COMBINESPEC=False) @@ -232,16 +229,20 @@ This archive includes spectra taken by • JWST (including MSA and slit spectroscopy) -```{code-cell} +```{code-cell} ipython3 %%time ## Get Spectra for HST df_spec_HST = HST_get_spec(sample_table , search_radius_arcsec = 0.5, datadir = "./data/", verbose = False) df_spec.append(df_spec_HST) ``` +```{code-cell} ipython3 + +``` + ### 2.3 ESA Archive -```{code-cell} +```{code-cell} ipython3 # Herschel PACS & SPIRE from ESA TAP using astroquery #This search is fully functional, but is commented out because it takes ~4 hours to run to completion herschel_radius = 1.1 @@ -255,7 +256,7 @@ herschel_download_directory = 'data/herschel' ### 2.4 SDSS Archive -```{code-cell} +```{code-cell} ipython3 %%time ## Get Spectra for JWST df_jwst = JWST_get_spec(sample_table , search_radius_arcsec = 0.5, datadir = "./data/", verbose = False) @@ -264,7 +265,7 @@ df_spec.append(df_jwst) This includes SDSS spectra. -```{code-cell} +```{code-cell} ipython3 %%time ## Get SDSS Spectra df_spec_SDSS = SDSS_get_spec(sample_table , search_radius_arcsec=5, data_release=17) @@ -276,7 +277,7 @@ df_spec.append(df_spec_SDSS) This includes DESI spectra. Here, we use the `SPARCL` query. Note that this can also be used for SDSS searches, however, according to the SPARCL webpage, only up to DR16 is included. Therefore, we will not include SDSS DR16 here (this is treated in the SDSS search above). -```{code-cell} +```{code-cell} ipython3 %%time ## Get DESI and BOSS spectra with SPARCL df_spec_DESIBOSS = DESIBOSS_get_spec(sample_table, search_radius_arcsec=5) @@ -286,8 +287,7 @@ df_spec.append(df_spec_DESIBOSS) ## 3. Make plots of luminosity as a function of time We show flux in mJy as a function of time for all available bands for each object. `show_nbr_figures` controls how many plots are actually generated and returned to the screen. If you choose to save the plots with `save_output`, they will be put in the output directory and labelled by sample number. - -```{code-cell} +```{code-cell} ipython3 ### Plotting #### create_figures(df_spec = df_spec, bin_factor=5, From 72d0ca354ac02dd619fd456b36d60304d2aaf600 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 16:38:53 +0000 Subject: [PATCH 2/8] added delete_data to HST function --- spectroscopy/code_src/mast_functions.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spectroscopy/code_src/mast_functions.py b/spectroscopy/code_src/mast_functions.py index 500f303d..6b8043cc 100644 --- a/spectroscopy/code_src/mast_functions.py +++ b/spectroscopy/code_src/mast_functions.py @@ -266,7 +266,7 @@ def JWST_group_spectra(df, verbose, quickplot): return(df_spec) -def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): +def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_data = True): ''' Retrieves HST spectra for a list of sources. @@ -281,6 +281,9 @@ def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): separate data directory (for example "[datadir]/HST/" for HST data). verbose : `bool` Verbosity level. Set to True for extra talking. + delete_data : `bool`, optional + If True, delete the downloaded data files. Default is True. + Returns ------- @@ -366,7 +369,12 @@ def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): filter=[tab["filters"][jj]], )).set_index(["objectid", "label", "filter", "mission"]) df_spec.append(dfsingle) - + + if delete_data: + for file in download_results["Local Path"]: + if os.path.exists(file): + os.remove(file) + else: print("Nothing to download for source {}.".format(stab["label"])) else: From 139165d3a0b3a6efffe9ff5ecc7c79139fded580 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 16:42:41 +0000 Subject: [PATCH 3/8] renaming herschel delete_tarfiles to delete_downloaded_data --- spectroscopy/code_src/herschel_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spectroscopy/code_src/herschel_functions.py b/spectroscopy/code_src/herschel_functions.py index 97e45885..b0f7868b 100644 --- a/spectroscopy/code_src/herschel_functions.py +++ b/spectroscopy/code_src/herschel_functions.py @@ -39,7 +39,7 @@ def find_max_flux_column(df): return max_flux_col -def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_tarfiles = False): +def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_downloaded_data = True): ''' Retrieves Herschel spectra from a subset of modes for a list of sources. @@ -52,7 +52,7 @@ def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_tarfil datadir : `str` Data directory where to store the data. Each function will create a separate data directory (for example "[datadir]/HST/" for HST data). - delete_tarfiles: True/False + delete_downloaded_data: True/False Should the tarfiles be deteled after spectra are extracted? Returns @@ -143,7 +143,7 @@ def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_tarfil print(f"Tarfile ReadError. This tarfile may be corrupt {path_to_file}") #delete tar files - if delete_tarfiles: + if delete_downloaded_data: filename_tar = f"data/herschel/{objectid_table[tab_id]['observation_id']}.tar" print('filename_tar', filename_tar) if os.path.exists(filename_tar): From 244d6f1548fa6d3b0f3d8f70b6104b9ea7c4ab14 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 16:58:38 +0000 Subject: [PATCH 4/8] fixing HST delete_downloaded_data to work --- spectroscopy/code_src/mast_functions.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/spectroscopy/code_src/mast_functions.py b/spectroscopy/code_src/mast_functions.py index 6b8043cc..96184369 100644 --- a/spectroscopy/code_src/mast_functions.py +++ b/spectroscopy/code_src/mast_functions.py @@ -1,5 +1,5 @@ import os, sys, io - +import shutil import numpy as np from contextlib import redirect_stdout @@ -266,7 +266,7 @@ def JWST_group_spectra(df, verbose, quickplot): return(df_spec) -def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_data = True): +def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data = True): ''' Retrieves HST spectra for a list of sources. @@ -281,7 +281,7 @@ def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_da separate data directory (for example "[datadir]/HST/" for HST data). verbose : `bool` Verbosity level. Set to True for extra talking. - delete_data : `bool`, optional + delete_downloaded_data : `bool`, optional If True, delete the downloaded data files. Default is True. @@ -370,10 +370,8 @@ def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_da )).set_index(["objectid", "label", "filter", "mission"]) df_spec.append(dfsingle) - if delete_data: - for file in download_results["Local Path"]: - if os.path.exists(file): - os.remove(file) + if delete_downloaded_data: + shutil.rmtree(this_data_dir) else: print("Nothing to download for source {}.".format(stab["label"])) From 7cf0e2be364669c1913eb7c57c7e25fc7d89b839 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 20:43:44 +0000 Subject: [PATCH 5/8] added delete_downloaded_data to JWST functions --- spectroscopy/code_src/mast_functions.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/spectroscopy/code_src/mast_functions.py b/spectroscopy/code_src/mast_functions.py index 96184369..8fb9978c 100644 --- a/spectroscopy/code_src/mast_functions.py +++ b/spectroscopy/code_src/mast_functions.py @@ -19,7 +19,7 @@ import matplotlib.pyplot as plt -def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): +def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data = True): ''' Retrieves HST spectra for a list of sources and groups/stacks them. This main function runs two sub-functions: @@ -37,6 +37,8 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): separate data directory (for example "[datadir]/HST/" for HST data). verbose : `bool` Verbosity level. Set to True for extra talking. + delete_downloaded_data : `bool`, optional + If True, delete the downloaded data files. Default is True. Returns ------- @@ -47,7 +49,7 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): ## Get the spectra print("Searching and Downloading Spectra... ") - df_jwst_all = JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose) + df_jwst_all = JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data) print("done") ## Group @@ -58,7 +60,7 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose): return(df_jwst_group) -def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose): +def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data ): ''' Retrieves HST spectra for a list of sources. @@ -73,6 +75,8 @@ def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose): separate data directory (for example "[datadir]/HST/" for HST data). verbose : `bool` Verbosity level. Set to True for extra talking. + delete_downloaded_data : `bool`, optional + If True, delete the downloaded data files. Returns ------- @@ -171,6 +175,10 @@ def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose): filter=[tab["filters"][jj]], )).set_index(["objectid", "label", "filter", "mission"]) df_spec.append(dfsingle) + + if delete_downloaded_data: + shutil.rmtree(this_data_dir) + else: print("Nothing to download for source {}.".format(stab["label"])) From e3794639b8c503216910a8e3f0a50ce00c5798f1 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Wed, 25 Sep 2024 21:15:35 +0000 Subject: [PATCH 6/8] removed open issues section from intro --- spectroscopy/spectra_generator.md | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/spectroscopy/spectra_generator.md b/spectroscopy/spectra_generator.md index 2105a152..63391eb7 100644 --- a/spectroscopy/spectra_generator.md +++ b/spectroscopy/spectra_generator.md @@ -70,7 +70,7 @@ The ones with an asterisk (*) are the challenging ones. • ... ## Runtime -As of 2024 August, this notebook takes ~300s to run to completion on Fornax using the 'Astrophysics Default Image' and the 'Large' server with 16GB RAM/ 4CPU. +As of 2024 August, this notebook takes ~330s to run to completion on Fornax using the 'Astrophysics Default Image' and the 'Large' server with 16GB RAM/ 4CPU. ## Authors: Andreas Faisst, Jessica Krick, Shoubaneh Hemmati, Troy Raen, Brigitta Sipőcz, David Shupe @@ -78,11 +78,6 @@ Andreas Faisst, Jessica Krick, Shoubaneh Hemmati, Troy Raen, Brigitta Sipőcz, D ## Acknowledgements: ... -## Open Issues: - -• Implement queries for: Herschel, Euclid (use mock data), SPHEREx (use mock data) -• Match to HEASARC -• Make more efficient (especially MAST searches) +++ @@ -100,13 +95,14 @@ This cell will install them if needed: ```{code-cell} ipython3 # Uncomment the next line to install dependencies if needed. -# !pip install -r requirements_spectra_generator.txt +!pip install -r requirements_spectra_generator.txt ``` ```{code-cell} ipython3 import sys import numpy as np import os +import time import matplotlib.pyplot as plt import matplotlib as mpl @@ -232,12 +228,27 @@ This archive includes spectra taken by ```{code-cell} ipython3 %%time ## Get Spectra for HST -df_spec_HST = HST_get_spec(sample_table , search_radius_arcsec = 0.5, datadir = "./data/", verbose = False) +df_spec_HST = HST_get_spec( + sample_table , + search_radius_arcsec = 0.5, + datadir = "./data/", + verbose = False, + delete_downloaded_data = True +) df_spec.append(df_spec_HST) ``` ```{code-cell} ipython3 - +%%time +## Get Spectra for JWST +df_jwst = JWST_get_spec( + sample_table , + search_radius_arcsec = 0.5, + datadir = "./data/", + verbose = False, + delete_downloaded_data = True +) +df_spec.append(df_jwst) ``` ### 2.3 ESA Archive @@ -250,21 +261,12 @@ herschel_download_directory = 'data/herschel' #if not os.path.exists(herschel_download_directory): # os.makedirs(herschel_download_directory, exist_ok=True) -#df_spec_herschel = Herschel_get_spec(sample_table, herschel_radius, herschel_download_directory, delete_tarfiles = True) +#df_spec_herschel = Herschel_get_spec(sample_table, herschel_radius, herschel_download_directory, delete_downloaded_data = True) #df_spec.append(df_spec_herschel) ``` ### 2.4 SDSS Archive -```{code-cell} ipython3 -%%time -## Get Spectra for JWST -df_jwst = JWST_get_spec(sample_table , search_radius_arcsec = 0.5, datadir = "./data/", verbose = False) -df_spec.append(df_jwst) -``` - -This includes SDSS spectra. - ```{code-cell} ipython3 %%time ## Get SDSS Spectra @@ -296,6 +298,6 @@ create_figures(df_spec = df_spec, ) ``` -```{raw-cell} +```{code-cell} ipython3 ``` From 18935534cd008d90d06927e74cf9bcbdc0ff14b4 Mon Sep 17 00:00:00 2001 From: Jessica Krick Date: Mon, 30 Sep 2024 15:10:54 +0000 Subject: [PATCH 7/8] edits from review including line spacing and import, pip installs, etc. --- spectroscopy/code_src/herschel_functions.py | 5 +++-- spectroscopy/code_src/mast_functions.py | 9 ++++++--- spectroscopy/spectra_generator.md | 4 +--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/spectroscopy/code_src/herschel_functions.py b/spectroscopy/code_src/herschel_functions.py index b0f7868b..a1a47b49 100644 --- a/spectroscopy/code_src/herschel_functions.py +++ b/spectroscopy/code_src/herschel_functions.py @@ -39,7 +39,8 @@ def find_max_flux_column(df): return max_flux_col -def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_downloaded_data = True): +def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, + delete_downloaded_data = True): ''' Retrieves Herschel spectra from a subset of modes for a list of sources. @@ -52,7 +53,7 @@ def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, delete_downlo datadir : `str` Data directory where to store the data. Each function will create a separate data directory (for example "[datadir]/HST/" for HST data). - delete_downloaded_data: True/False + delete_downloaded_data: `bool`, optional Should the tarfiles be deteled after spectra are extracted? Returns diff --git a/spectroscopy/code_src/mast_functions.py b/spectroscopy/code_src/mast_functions.py index 8fb9978c..d37f8d25 100644 --- a/spectroscopy/code_src/mast_functions.py +++ b/spectroscopy/code_src/mast_functions.py @@ -19,7 +19,8 @@ import matplotlib.pyplot as plt -def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data = True): +def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, + delete_downloaded_data = True): ''' Retrieves HST spectra for a list of sources and groups/stacks them. This main function runs two sub-functions: @@ -60,7 +61,8 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_d return(df_jwst_group) -def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data ): +def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose, + delete_downloaded_data ): ''' Retrieves HST spectra for a list of sources. @@ -274,7 +276,8 @@ def JWST_group_spectra(df, verbose, quickplot): return(df_spec) -def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, delete_downloaded_data = True): +def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, + delete_downloaded_data = True): ''' Retrieves HST spectra for a list of sources. diff --git a/spectroscopy/spectra_generator.md b/spectroscopy/spectra_generator.md index 63391eb7..cae11503 100644 --- a/spectroscopy/spectra_generator.md +++ b/spectroscopy/spectra_generator.md @@ -78,7 +78,6 @@ Andreas Faisst, Jessica Krick, Shoubaneh Hemmati, Troy Raen, Brigitta Sipőcz, D ## Acknowledgements: ... - +++ ### Datasets that were considered but didn't end up being used: @@ -95,14 +94,13 @@ This cell will install them if needed: ```{code-cell} ipython3 # Uncomment the next line to install dependencies if needed. -!pip install -r requirements_spectra_generator.txt +# !pip install -r requirements_spectra_generator.txt ``` ```{code-cell} ipython3 import sys import numpy as np import os -import time import matplotlib.pyplot as plt import matplotlib as mpl From cf7525470b67f2cd0c8e66771e1f079f94df3120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Mon, 30 Sep 2024 13:48:26 -0700 Subject: [PATCH 8/8] Minor cleanups before merging [skip ci] --- spectroscopy/code_src/herschel_functions.py | 2 +- spectroscopy/code_src/mast_functions.py | 6 +++--- spectroscopy/spectra_generator.md | 21 +++++++++------------ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/spectroscopy/code_src/herschel_functions.py b/spectroscopy/code_src/herschel_functions.py index a1a47b49..afc1f52b 100644 --- a/spectroscopy/code_src/herschel_functions.py +++ b/spectroscopy/code_src/herschel_functions.py @@ -40,7 +40,7 @@ def find_max_flux_column(df): def Herschel_get_spec(sample_table, search_radius_arcsec, datadir, - delete_downloaded_data = True): + delete_downloaded_data=True): ''' Retrieves Herschel spectra from a subset of modes for a list of sources. diff --git a/spectroscopy/code_src/mast_functions.py b/spectroscopy/code_src/mast_functions.py index d37f8d25..d42df508 100644 --- a/spectroscopy/code_src/mast_functions.py +++ b/spectroscopy/code_src/mast_functions.py @@ -20,7 +20,7 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, - delete_downloaded_data = True): + delete_downloaded_data=True): ''' Retrieves HST spectra for a list of sources and groups/stacks them. This main function runs two sub-functions: @@ -62,7 +62,7 @@ def JWST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, def JWST_get_spec_helper(sample_table, search_radius_arcsec, datadir, verbose, - delete_downloaded_data ): + delete_downloaded_data=True): ''' Retrieves HST spectra for a list of sources. @@ -277,7 +277,7 @@ def JWST_group_spectra(df, verbose, quickplot): return(df_spec) def HST_get_spec(sample_table, search_radius_arcsec, datadir, verbose, - delete_downloaded_data = True): + delete_downloaded_data=True): ''' Retrieves HST spectra for a list of sources. diff --git a/spectroscopy/spectra_generator.md b/spectroscopy/spectra_generator.md index cae11503..fbe6183b 100644 --- a/spectroscopy/spectra_generator.md +++ b/spectroscopy/spectra_generator.md @@ -228,10 +228,10 @@ This archive includes spectra taken by ## Get Spectra for HST df_spec_HST = HST_get_spec( sample_table , - search_radius_arcsec = 0.5, - datadir = "./data/", - verbose = False, - delete_downloaded_data = True + search_radius_arcsec=0.5, + datadir="./data/", + verbose=False, + delete_downloaded_data=True ) df_spec.append(df_spec_HST) ``` @@ -241,10 +241,10 @@ df_spec.append(df_spec_HST) ## Get Spectra for JWST df_jwst = JWST_get_spec( sample_table , - search_radius_arcsec = 0.5, - datadir = "./data/", - verbose = False, - delete_downloaded_data = True + search_radius_arcsec=0.5, + datadir="./data/", + verbose=False, + delete_downloaded_data=True ) df_spec.append(df_jwst) ``` @@ -259,7 +259,7 @@ herschel_download_directory = 'data/herschel' #if not os.path.exists(herschel_download_directory): # os.makedirs(herschel_download_directory, exist_ok=True) -#df_spec_herschel = Herschel_get_spec(sample_table, herschel_radius, herschel_download_directory, delete_downloaded_data = True) +#df_spec_herschel = Herschel_get_spec(sample_table, herschel_radius, herschel_download_directory, delete_downloaded_data=True) #df_spec.append(df_spec_herschel) ``` @@ -296,6 +296,3 @@ create_figures(df_spec = df_spec, ) ``` -```{code-cell} ipython3 - -```