-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Pst refactoring #42
Conversation
for line in content: | ||
data = line.split(' ') | ||
target_ID = data[0] | ||
content = csv.reader(open(input_file, "r")) |
There was a problem hiding this comment.
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/* |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard coded?
src/pst/fitting_module.py
Outdated
sed, weights = ssp.compute_SED(t, cum_mass, z_array) | ||
|
||
|
||
sed = model.compute_SED(SSP = ssp, t_obs = t0) |
There was a problem hiding this comment.
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.
src/pst/fitting_module.py
Outdated
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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
)
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. |
No longer ignoring tutorials
@@ -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 |
There was a problem hiding this comment.
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.
-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.