Generating Fiducial Lines for Stellar Photometry Data

This Python script automates the process of generating fiducial lines for stellar photometry data gathered from the Hubble Space Telescope's HUGS survey data of NGC2808. It loads photometry data from a pickle file, computes fiducial lines using specific filters and their RMS values with options for Monte Carlo runs, caching, and verbosity adjustments, and finally saves the computed fiducial lines back into another pickle file for future analysis.

from fidanka.fiducial import fiducial_line
 
import pickle as pkl
import numpy as np
import matplotlib.pyplot as plt
import os
 
PHOTROOT = "/mnt/p/d/Astronomy/GraduateSchool/Thesis/GCConsistency/NGC2808/photometry/HUGS/ngc2808/photometry.pkl"
with open(PHOTROOT, 'rb') as f:
    photometry = pkl.load(f)[1]
 
fiducialLine = fiducial_line(
        photometry["F275W"],
        photometry["F814W"],
        photometry["F275W_RMS"],
        photometry["F814W_RMS"],
        reverseFilterOrder=True,
        mcruns=10,
        allowMax=False,
        verbose=False,
        cacheDensity=True,
        cacheDensityName="HUGSDesnsity.npz"
        )
 
with open("HUGSFiducials.pkl", 'wb') as f:
    pkl.dump(fiducialLine, f)