Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pst refactoring #42

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Pst refactoring #42

wants to merge 39 commits into from

Conversation

Danieljl96
Copy link
Collaborator

-Fitting module and Illustris tutorial are now working properly with the new changes and are ready to merge.
-Illustris photometric input information of 1000 galaxies added on a file ready for the tutorial.
-Illustris galaxies data (used for comparison on the tutorial) added as csv file. Smarter ways to store/read the information may be possible.

Future work:
-Add documentation of the tutorial routine, including instructions of the format of the inputs.
-Tutorial for salim galaxies.

Note: work in progress and not-ready files have been submitted due to a mistake on my gitignore. A cleanup will be done soon.

for line in content:
data = line.split(' ')
target_ID = data[0]
content = csv.reader(open(input_file, "r"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using a library that is not imported and then it will crash.

.gitignore Outdated
@@ -2,6 +2,7 @@ src/pst/data/ssp/*
!*src/pst/data/ssp/PopStar/popstar_cha_0.15_100.fits
src/pst/data/filters/*
tutorials/output/*
tutorials/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ignores everything inside the tutorial directory! We definitely do not want that.

obs_filters_wl = filters_wl
ssp.cut_wavelength(1000, 1600000)

ssp.cut_wavelength(1000, 1600000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard coded?

sed, weights = ssp.compute_SED(t, cum_mass, z_array)


sed = model.compute_SED(SSP = ssp, t_obs = t0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the argument should be passed as ssp=ssp, otherwise I believe it would not work.

Comment on lines 212 to 183
fnu_Jy, fnu_Jy_err = photo.get_fnu(sed, spectra_err=None)
spectra_flambda = ( sed/(4*np.pi*(10*u.pc)**2) )
fnu_Jy, fnu_Jy_err = photo.get_fnu(spectra_flambda, spectra_err=None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have implemented a new way to compute the photometry (also accounting for redshift)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is impossible that the constructor of Polynomical_MFH_fit would work. It uses old versions of the code, .e.g. ssp.compute_SED which is no longer available.

Polynomial_MFH is not in the models module. It also needs to change the name to the new standard (i.e. CEM instead of MFH)

@PabloCorcho
Copy link
Collaborator

This PR requires a bit of work and cannot be merged as it is. I would also argue that if we want to make this module public, it needs to include full documentation following the same scheme as in the rest of the modules.

@@ -442,7 +443,127 @@ def __init__(self, **kwargs):
def stellar_mass_formed(self, times: u.Quantity):
return super().stellar_mass_formed(times)

#-------------------------------------------------------------------------------

class PolynomialCEM_fit: #Generates the basis for the Polynomial MFH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class should be a method of PolynomialCEM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants