skypyproject / skypy

SkyPy: A package for modelling the Universe.
BSD 3-Clause "New" or "Revised" License
118 stars 38 forks source link

Apparent magnitudes of galaxies #141

Closed philipp128 closed 4 years ago

philipp128 commented 4 years ago

Description

The first step is to calculate the kcorrected absolute magnitudes of the galaxies. This is done by integrating each of the kcorrect templates [1] multiplied by the redshifted filter transmissions curves for each filter over the wavelength for a certain set of redshifts. We then interpolate the galaxy redshift to these magnitudes and assign each of the five kcorrected absolute magnitudes to every bin to the galaxies. As the SED of each galaxy is given by 5 coefficients (see [1] and [2], the SED is given as a linear combination of these coefficients and the kcorrect templates), we can then use these coefficients to calculate the absolute magnitude in each filter of the galaxies. The last step is to transform the absolute magnitudes to the apparent magnitudes using the distance modulus.

Inputs

Outputs

References

[1] Blanton & Roweis (2006) [2] Herbel et al. (2017)

rrjbca commented 4 years ago

I saw this a while ago and wonder if it might be helpful for handling flux units and also flux-magnitude equivalencies: https://docs.astropy.org/en/stable/units/logarithmic_units.html

rrjbca commented 4 years ago

We should also bear in mind that we will want to be able to reuse a lot of this code to integrate e.g. supernova SEDs and therefore aim to keep it as general as possible. In fact we may want to start a new subpackage e.g. skypy.observations

rrjbca commented 4 years ago

I've briefly looked over synphot and wonder if we should just be using that instead. Especially as it is an astropy affiliated package.

philipp128 commented 4 years ago

I am looking at synphot. As I see one way to get the magnitude would be using an object of the Observation class. Creating this I would use a spectulis.Spectrum1D object. However, I don't understand what the parameter spectral_axis in Spectrum1D is. And where can I give the wavelength? Did you go as deep in this package? Similar to the very last example in https://synphot.readthedocs.io/en/latest/synphot/observation.html#specutils.