Skip to content

Commit

Permalink
Formatting..
Browse files Browse the repository at this point in the history
  • Loading branch information
correac committed Jan 10, 2024
1 parent 13650da commit 8452738
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
8 changes: 4 additions & 4 deletions colibre/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,13 +987,13 @@ def register_carbon_to_oxygen(self, catalogue, aperture_sizes):
log_C_over_O_times_gas_mass[mask] / gas_cold_dense_mass[mask]
)

log_C_over_O.name = (
f"Total (Dust + Diffuse) Gas $\\log_{{10}}({{\\rm C/O}})$ ({aperture_size} kpc)"
)
log_C_over_O.name = f"Total (Dust + Diffuse) Gas $\\log_{{10}}({{\\rm C/O}})$ ({aperture_size} kpc)"

# Register the field
setattr(
self, f"gas_c_over_o_total_abundance_avglin_{aperture_size}_kpc", log_C_over_O
self,
f"gas_c_over_o_total_abundance_avglin_{aperture_size}_kpc",
log_C_over_O,
)
setattr(self, f"has_cold_dense_gas_{aperture_size}_kpc", mask)

Expand Down
27 changes: 18 additions & 9 deletions colibre/scripts/stellar_abundances.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ def read_data(data, xvar, yvar):
z = h.T

binsize = 0.2
grid_min = np.log10(1) # Note that the histograms have been normalized. Therefore this **does not** indicate a minimum of 1 star per bin!
grid_min = np.log10(
1
) # Note that the histograms have been normalized. Therefore this **does not** indicate a minimum of 1 star per bin!
grid_max = np.log10(np.ceil(h.max()))
levels = np.arange(grid_min, grid_max, binsize)
levels = 10 ** levels
Expand All @@ -380,23 +382,30 @@ def read_data(data, xvar, yvar):

ax.annotate("APOGEE data", (-3.8, -1.3))


if (xvar == "Fe_H") & (yvar == "O_Fe"):
observational_data = [f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_OFe_FeH.hdf5",
f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_OFe_FeH.hdf5"]
observational_data = [
f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_OFe_FeH.hdf5",
f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_OFe_FeH.hdf5",
]

elif (xvar == "Fe_H") & (yvar == "C_Fe"):
observational_data = [f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_CFe_FeH.hdf5"]
observational_data = [
f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_CFe_FeH.hdf5"
]

elif (xvar == "Fe_H") & (yvar == "N_Fe"):
observational_data = [f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_NFe_FeH.hdf5",
f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_NFe_FeH.hdf5"]
observational_data = [
f"{path_to_obs_data}/data/StellarAbundances/Cayrel_2004_NFe_FeH.hdf5",
f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_NFe_FeH.hdf5",
]

elif (xvar == "Fe_H") & (yvar == "N_O"):
observational_data = [f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_NO_FeH.hdf5"]
observational_data = [
f"{path_to_obs_data}/data/StellarAbundances/Israelian_2004_NO_FeH.hdf5"
]

else:
observational_data = None
observational_data = None

if not observational_data is None:
for obs in load_observations(observational_data):
Expand Down

0 comments on commit 8452738

Please sign in to comment.