This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def Moffat_3d_test(x, mean, stddev, Gauss_bkg, Gauss_grad, | |
| Moffat_amplitude, x_0, y_0, gamma, alpha, Moffat_bkg): | |
| # Moffat | |
| rr_gg = ((x_fit - x_0)**2 + (y_fit - y_0)**2) / gamma**2 | |
| F_OIII_xy = Moffat_amplitude * (1 + rr_gg)**(-alpha) + Moffat_bkg | |
| # Prep for Gauss 1D | |
| Gauss_std = np.sqrt(stddev**2 + std_MUSE**2) | |
| A_OIII_xy = F_OIII_xy / (np.sqrt(2*np.pi) * Gauss_std) | |
| check_1.append(A_OIII_xy) | |
| model_spectra = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Define custom two peak Gaussian model using Astropy class type. | |
| class Gaussian1D_OIII(Fittable1DModel): | |
| amplitude = Parameter() | |
| mean = Parameter() | |
| stddev = Parameter() | |
| a = Parameter() | |
| b = Parameter() | |
| # evaluate the model. This is composued using the Fittable1DModel class from Astropy. | |
| @staticmethod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| logger.info(f"N fitted PNe: {}") | |
| logger.info(f"PNLF N: {}") | |
| logger.info(f"Bolometric luminosity: {}") | |
| logger.info(f"L_bol error: {} {}") | |
| logger.info(f"Rmag: {}") | |
| logger.info(f"Vmag: {}") | |
| logger.info(f"Distance (Mpc) +/-: {} {}") | |
| logger.info(f"dM +/-: {} {}") | |
| logging.basicConfig(filename=f"{EXPORT_DIR}{galaxy_name}_{loc}_log.log", level=logging.INFO, format="%(asctime)s -%(message)s", datefmt="%d-%b-%y %H:%M:%S") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def minicube_extractor(x, y, n_pix, data): | |
| """Extract a PNe minicube from a given MUSE residual cube. | |
| Parameters | |
| ---------- | |
| x : [float] | |
| x coordinate | |
| y : [float] | |
| y coordinate |