Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

How to get from spectra to magnitude?


Recommended Posts

Hi,

I used the b-v colour index of Polaris to determine temperature. I fitted a back body spectrum for that temperature. All done using astropy, synphot, spextra libraries in python. Easy, but when I continue a make an observation with a V filter, I get an estimated V mag of 14.69, that is way off. 

The b-v colour index is 0.6, the temperature is 5967.54 K. The flux through the simulated V filter is 4.737E-15 erg/s/cm2/AA

It think it has something to do instrumental vs calibrated mags? 

So basically what is the process to get the mags from an observed spectra? 

Link to comment
Share on other sites

2 hours ago, andrew s said:

This may help. Regards Andrew 

Thanks Andrew seems to be what I'm looking for, but where do I find these equations? are they specific for a given catalog?

I am referring to eq. B=B0 -13.028 - 0.01(B0 - V0) etc

Link to comment
Share on other sites

3 hours ago, dan_adi said:

So basically what is the process to get the mags from an observed spectra? 

So you have a spectrum of the star and you want to calculate magnitude in particular band?

You are probably short of a multiplicative constant. You need to calibrate your instrument to be able to get precise magnitudes - and in this case it is multiplicative calibration.

Determining V band intensity from spectrum is fairly straight forward - you take spectrum and you multiply with V filter response and you integrate the result.

V band filter response can be given in percent or rather 0-1 range - so it does not influence choice of units. Spectrum on the other hand needs to be scaled to appropriate values in units of interest and if it's not - you need to scale it, to find multiplicative constant for your system.

To do that - calibrate on a known star. Take a spectrum of star whose magnitude you know - do the same integration to find numerical constant and then apply this constant back in the case of star you are interested in.

It's really like regular photometry - you need to calibrate your instrument first.

Link to comment
Share on other sites

25 minutes ago, vlaiv said:

To do that - calibrate on a known star. Take a spectrum of star whose magnitude you know - do the same integration to find numerical constant and then apply this constant back in the case of star you are interested in.

As explained in the link this assumes you have a wide slit so that you collect equally all the wave lengths. Obviously, it depends on how accurate you want it to be. However,  there are many issues for example atmospheric effects if the known star and target star are at different altitudes.  It's certainly not as easy as differential photometry.

Regards Andrew 

  • Like 2
Link to comment
Share on other sites

1 hour ago, dan_adi said:

Thanks Andrew seems to be what I'm looking for, but where do I find these equations? are they specific for a given catalog?

I am referring to eq. B=B0 -13.028 - 0.01(B0 - V0) etc

It's  a long time since I looked seriously at this. It's explained in part 3. For a given rig you observe standard photometric stars and then use these to calculate the linear fit constants I.e. an adaptive and multiplicative constant.

Regards Andrew 

Link to comment
Share on other sites

54 minutes ago, vlaiv said:

So you have a spectrum of the star and you want to calculate magnitude in particular band?

You are probably short of a multiplicative constant. You need to calibrate your instrument to be able to get precise magnitudes - and in this case it is multiplicative calibration.

Determining V band intensity from spectrum is fairly straight forward - you take spectrum and you multiply with V filter response and you integrate the result.

V band filter response can be given in percent or rather 0-1 range - so it does not influence choice of units. Spectrum on the other hand needs to be scaled to appropriate values in units of interest and if it's not - you need to scale it, to find multiplicative constant for your system.

To do that - calibrate on a known star. Take a spectrum of star whose magnitude you know - do the same integration to find numerical constant and then apply this constant back in the case of star you are interested in.

It's really like regular photometry - you need to calibrate your instrument first.

Hello Vlaiv,

It is a theoretical exercise in synphot - python

I make a source spectrum object that takes as argument Temperature [k] like this:

sp = SourceSpectrum(BlackBodyNorm1D, temperature=bv.bv2T(0.60))

bv2T is a method in the bv object that returns temperature having b-v colour index as argument.

I retrieve the wavelength and spectral flux density as arrays (and make unit conversion for flux):

wave = sp.waveset
flux = sp(wave).to(u.erg / u.s / u.angstrom/u.cm**2,equivalencies=u.spectral_density(wave))

then I make the same spectrum but with spextra library because it is easier to work with:

sp = Spextrum.from_arrays(waves=wave,flux=flux)

Next I make an observation using the V filter (it convolves the spectra and filter):

integrated_flux= sp.get_flux(filter_curve="./filters_ascii/johnson_V.dat")

# result is 4.737e-15 erg/s/cm2/A

Also I get the magnitude easily:

V = sp.get_magnitude(filter_curve="./filters_ascii/johnson_V.dat", system_name="Vega")

# returns 14.69
# the mag V in a Simbad search is around 2.2

Given the difference I assumed I am actually computing instrumental mags, and I need a zero point for conversion to calibrated mags.

Link to comment
Share on other sites

7 minutes ago, dan_adi said:

Given the difference I assumed I am actually computing instrumental mags, and I need a zero point for conversion to calibrated mags.

Ok, I get what you are doing, but here are some points to think about.

sp = SourceSpectrum(BlackBodyNorm1D, temperature=bv.bv2T(0.60))

What sort of intensity does this function return?

Imagine you have two stars - both have the same temperature and ideal black body spectrum. Both are exactly the same - but one of them is at half the distance of the other with respect to us.

You record those two spectra - and they will have exact same shape - except one of them will be x4 "stronger" than the other - simply because star is closer to us and consequently appears brighter.

You don't have means to specify "brightness" of the spectrum in this method.

Similarly:

wave = sp.waveset
flux = sp(wave).to(u.erg / u.s / u.angstrom/u.cm**2,equivalencies=u.spectral_density(wave))

I don't see how you tell the function how to calculate physical flux - is it "stronger" or "weaker" of two spectra? Flux should be x4 as high numerically for same values between the two - but if we don't have that information in SP and you did not use any parameter to explain how to convert to flux - flux simply does not contain "true" values here.

In the end - integrated flux will be some number that will correspond to some magnitude - but that is simply because numerical values for flux are some arbitrary numbers and not true numbers for true star with some defined brightness.

It does not need to be a real star - but it has to have defined brightness and I don't see how that is defined.

Link to comment
Share on other sites

16 minutes ago, vlaiv said:

What sort of intensity does this function return?

Returns this when plotted:

Screenshot2024-01-03at23_34_16.png.4be33ca90fd50008eae024f4207a230b.png

But I do understand what you're saying. The b-v colour index I got from Simbad, I thought it encodes the intensity as well.

Hmm, seems harder than I thought.

I'm thinking of trying the other way around for fun, simulate the spectrum, then search the V band mag in Simbad, then scale the spectrum to that magnitude, then make a synthetic observation with the V filter and see if I get the same magnitude as Simbad. Scaling to the magnitude would basically underline your idea about brightness

Link to comment
Share on other sites

46 minutes ago, vlaiv said:

n the end - integrated flux will be some number that will correspond to some magnitude - but that is simply because numerical values for flux are some arbitrary numbers and not true numbers for true star with some defined brightness.

Quite wright,

If I take the V band mag from Simbad v = 2.02 and scale the spectra at that amplitude, and then convolve the synthetic filter with the scaled spectra, I get the same mag as the input. 

sp2 = Spextrum.from_arrays(waves=wave,flux=flux, flux_unit='FLAM').scale_to_magnitude(amplitude=2.02 * u.mag,filter_curve="./filters_ascii/johnson_V.dat")
sp2.plot(flux_unit='FLAM')

Plot

Screenshot2024-01-04at00_06_00.png.3572037728a242f4dff6f9d25f5132d2.png

Returned magnitude with V filter observation:

v2= sp2.get_magnitude(filter_curve="./filters_ascii/johnson_V.dat", system_name="Vega")

#output 2.02 mag

So that means the color index only provides information about temperature, but not brightness. Makes sense distance is a factor in brightness, besides temperature. 

Link to comment
Share on other sites

1 hour ago, dan_adi said:

I'm thinking of trying the other way around for fun, simulate the spectrum, then search the V band mag in Simbad, then scale the spectrum to that magnitude, then make a synthetic observation with the V filter and see if I get the same magnitude as Simbad. Scaling to the magnitude would basically underline your idea about brightness

If you scale against V and measure V - you will get the same value.

Here is what you can do as an exercise:

- find a star in catalog with known V and B magnitude, then use Gaia dataset to find effective temperature of that star - not one from color index.

- generate spectrum according to that temperature

- scale spectrum based on V mangnitude

- measure B magnitude and compare to catalog value of B and compare your B-V index to Gaia effective temperature

41 minutes ago, dan_adi said:

So that means the color index only provides information about temperature, but not brightness. Makes sense distance is a factor in brightness, besides temperature. 

Well, if you think about what color index actually represents - you will have a better understanding of why it only corresponds to temperature.

Color index is difference of two magnitudes. Magnitudes are log based, and we know that if we have ratio of two quantities - corresponding thing in "log space" is difference. ( * and / turn to + and - in log).

What this really means it that color index is ratio of two intensities - intensity in V band and intensity in B band - turned into magnitude / log system.

If we have certain star and we increase it's apparent brightness by say making it closer - its intensity will change - maybe it will double - but that means that both V band intensity will double and B band intensity will double. However - ratio of these two values won't change as 2*V/2*B = V/B. Color index of a star does not change with its apparent brightness. It only contains ratio of different band intensities.

Since this ratio varies with temperature as black body curve is different - color index represents temperature of the star in a nutshell.

Link to comment
Share on other sites

23 hours ago, dan_adi said:
 result is 4.737e-15 erg/s/cm2/A

This is the flux per unit area surface A of the (theoretical black body) star.  When we measure the flux on earth, the units might look the same,  erg/s/cm2/A but on earth we measure the flux per unit collecting area of the collecting instrument.  The two measurements are not directly related.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.