{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# EAZY-py\n", "\n", "After appropriately loading in the catalogue, it would be fantastic if we also had some properties for each source. The most basic quantity we can measure is the photometric redshift." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reading GALFIND config file from: /nvme/scratch/work/austind/GALFIND/galfind/../configs/galfind_config.ini\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:galfind:Aperture corrections for VISTA not found in /nvme/scratch/work/austind/GALFIND/galfind/Aperture_corrections/VISTA_aper_corr.txt\n", "WARNING:galfind:Aperture corrections for VISTA not found in /nvme/scratch/work/austind/GALFIND/galfind/Aperture_corrections/VISTA_aper_corr.txt\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Failed to `import dust_attenuation`\n", "Install from the repo with $ pip install git+https://github.com/karllark/dust_attenuation.git\n" ] } ], "source": [ "import astropy.units as u\n", "from galfind import Catalogue_Creator, Data, EAZY\n", "from galfind.Data import morgan_version_to_dir" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:galfind:Loaded aper_diams= for F277W+F356W+F444W\n", "INFO:galfind:Combined mask for NIRCam/F277W+F356W+F444W already exists at /raid/scratch/work/austind/GALFIND_WORK/Masks/JOF/combined/JOF_F277W+F356W+F444W_auto.fits\n", "WARNING: hdu= was not specified but multiple tables are present, reading in first available table (hdu=1) [astropy.io.fits.connect]\n", "WARNING:astroquery:hdu= was not specified but multiple tables are present, reading in first available table (hdu=1)\n", "WARNING:galfind:Aperture correction columns already in /raid/scratch/work/austind/GALFIND_WORK/Catalogues/v11/NIRCam/JOF/(0.32)as/JOF_MASTER_Sel-F277W+F356W+F444W_v11.fits\n", "Calculating depths: 0%| | 0/15 [00:00\n", "WARNING:galfind:cat_aper_diams not in kwargs.keys()=dict_keys(['ZP', 'min_flux_pc_err'])! Setting to aper_diams=\n", "WARNING:galfind:cat_aper_diams not in kwargs.keys()=dict_keys([])! Setting to aper_diams=\n", "WARNING:galfind:cat_type = cat_type='selection' not in ['ID', 'sky_coord', 'phot', 'mask', 'depths'] and not a valid HDU extension in /raid/scratch/work/austind/GALFIND_WORK/Catalogues/v11/NIRCam/JOF/(0.32)as/JOF_MASTER_Sel-F277W+F356W+F444W_v11.fits!\n", "WARNING:galfind:selection tab is None!\n", "INFO:galfind:Made /raid/scratch/work/austind/GALFIND_WORK/Catalogues/v11/NIRCam/JOF/(0.32)as/JOF_MASTER_Sel-F277W+F356W+F444W_v11.fits catalogue!\n", "INFO:galfind:Making .in file for EAZY_fsps_larson_zfree SED fitting for JOF v11 NIRCam\n", "INFO:galfind:Made .in file for EAZY_fsps_larson_zfree SED fitting for JOF v11 NIRCam. \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Running SED fitting took 0.1s\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "INFO:galfind:Loading EAZY_fsps_larson property PDFs into JOF v11 NIRCam\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Loading properties and associated errors took 1.1s\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Constructing redshift PDFs: 100%|██████████| 16335/16335 [00:00<00:00, 32911.93it/s]\n", "INFO:galfind:Finished loading EAZY_fsps_larson property PDFs into JOF v11 NIRCam\n", "INFO:galfind:Loading EAZY_fsps_larson SEDs into JOF v11 NIRCam\n", "Constructing SEDs: 100%|██████████| 16335/16335 [00:01<00:00, 12447.91it/s]\n", "INFO:galfind:Finished loading EAZY_fsps_larson SEDs into JOF v11 NIRCam\n" ] } ], "source": [ "cat_path = JOF_data.phot_cat_path\n", "filterset = JOF_data.filterset\n", "# [0.32] * u.arcsec hardcoded for now\n", "cat_creator = Catalogue_Creator(survey, version, cat_path, filterset, aper_diams)\n", "cat = cat_creator()\n", "\n", "SED_fit_params = {\"templates\": \"fsps_larson\", \"lowz_zmax\": None}\n", "EAZY_fitter = EAZY(SED_fit_params)\n", "EAZY_SED_results_arr = EAZY_fitter(cat, aper_diams[0])" ] } ], "metadata": { "kernelspec": { "display_name": "more_and_more_galfind", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.20" } }, "nbformat": 4, "nbformat_minor": 2 }