Python pipeline for creating stellar mass calculations for galaxies observed in the infrared via the Wide-field Infrared Survey Explorer. Multiple outside repositories are referenced in the tutorial, plus instructions for cloning and working with the repositories are detailed in the tutorial.
Requirements:
-
First, designate a folder/directory that you want to work out of, this directory will be where all of the files and images that are generated will go. This directory can be anywhere on your device, just make sure you can get the path for it (and remember where it is)!
-
Second, you will need to clone two repositories: This respository (GBT-Stellar-Mass-Calculations) and the halphagui repository.
- Go to this link and clone the repository to your device. Do the same for this repository. Make sure you clone them to somewhere you remember!
-
You will then need to go into that cloned repo and create a python virtual environment with Anaconda. Here is a link on how to create the virtual environment. One created, activate the environment.
-
Next, you will need to create a python environment kernel, install the
requirements.txt
for all of the dependencies of thehalphagui
repo, and installjupyterlab
via these steps:pip install ipykernel
pip install -r requirements.txt
python -m ipykernel install --user --name=[insert name here]
conda install -c conda-forge jupyterlab
- If Jupyter Lab does not start, you may have to install
chardet
:conda install chardet
-
You will also need to install
SWarp
via MacPorts onto your device.SWarp
is used to co-add multiple.fits
images using any astrometric projection.- Go to this link for the MacPorts installation guide. Once MacPorts is successfully installed onto your deivce, in a terminal, install
SWarp
with this line:port install swarp
-
Once all of these steps are complete, launch Jupyter Lab, create a notebook with the
halphagui
kernel, and run theStMassCalcs_functions.py
file! Steps for this are below. -
For running the
StMassCalcs_functions.py
file:- Make sure the selected kernel for your notebook is the kernel you created earlier!
- Use this line of code to run the python file:
%run StMassCalcs_functions.py --cwd [full path to desired working directory] --tablepath [full path to your compiled galaxy table]
- Note: You might have to provide the path to
StMassCalcs_functions.py
.
- Note: You might have to provide the path to
- You will then have access to your table under the variable name
mytable
and all of the functions in the python file.
- Call the
getMasses
function with your table, let it run, and voilà!- The output table
galTable_withMasses.fits
automatically is downloaded into yourdata
folder in your current working directory.
- The output table
Folders:
- Comma separated list of the 16 SNe host galaxies that had missing AGC numbers from the
UATSNeHostGalaxyCatalogue_20230425.csv
. - We are working to verify which AGC numbers are the correct numbers based on their SN ID and position. Most of these galaxies have been verified, but there are a few that require the full AGC allsky catalog.
- File containing 191 GBT+Archival galaxies that were matched with the Siena Galaxy Atlas. These are the galaxies that I will run bagpipes on to calculate logarithmic stellar masses from photometry.
- The original 334 SNe host galaxies from the GBT+Archival sample.
- Contains column names: AGCnr, HIMANGA, ALFALFA, SPRINGOB, radeg, decdeg, hiflux, width, widtherr, snr, D, vhelagc, vhelio, vopt, v21, Ty, a, b, b/a, zmag, rms, hisrc, logMH, logMH_Limit, and Type.
- Will contain all of the data for each galaxy from the SNe host sample. Each galaxy will have a folder named with its AGC number, and subfolders
figures
containing images/cutouts for the unWISE images and photometry plots, andimdat
contains all of the .fits and .csv files generated inStMassCalcs_functions.py
.
- Nothing in here yet, but I will include sandbox notebooks that I have worked through that created the output stellar mass calculations for the GBT+Archival sample.