n_phot#

class arte.photometry.n_phot.DefaultModel#

Bases: object

Table of magnitudes for each band.

ref.: P.Lena, Astrophysiquemethodes physiques de l’observation,

pp.95–96, Coll. Savoirs Actuels, InterEd./CNRS-Ed. (1996)

except Na-band (added)

back_mag_tab = [23.0, 22.0, 21.0, 20.0, 19.5, 14.0, 13.5, 12.5, 3.0, 0.0, 23.0]#
band_tab = ['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K', 'L', 'M', 'Na']#
e0_tab = [4.35e-08, 7.2e-08, 3.92e-08, 1.7600000000000002e-08, 8.3e-09, 3.4000000000000003e-09, 7.000000000000001e-10, 3.9e-10, 8.1e-11, 2.2e-11, 3.92e-08]#
lambda_tab = [3.6e-07, 4.3999999999999997e-07, 5.5e-07, 7e-07, 9e-07, 1.2499999999999999e-06, 1.6499999999999999e-06, 2.2e-06, 3.3999999999999996e-06, 4.9999999999999996e-06, 5.89e-07]#
width_tab = [6.8e-08, 9.8e-08, 8.899999999999999e-08, 2.1999999999999998e-07, 2.4e-07, 3e-07, 3.5e-07, 4e-07, 5.5e-07, 3e-07, 1e-08]#
class arte.photometry.n_phot.Maory1Model#

Bases: object

based on E-SPE-ESO-276-0206 issue 1 and MAORY Tech Notes 19 Dec 2007

back_mag_tab = [21.4, 20.6, 19.7, 16.5, 14.4, 13.0]#
band_tab = ['V', 'R', 'I', ' J', 'H', 'K']#
e0_tab = [3.68e-08, 1.77e-08, 1.19e-08, 2.86e-09, 1.0800000000000002e-09, 3.7900000000000004e-10]#
lambda_tab = [5.4e-07, 6.5e-07, 8e-07, 1.2499999999999999e-06, 1.6499999999999999e-06, 2.2e-06]#
width_tab = [9e-08, 1.3e-07, 2e-07, 3e-07, 3.5e-07, 4e-07]#
arte.photometry.n_phot.get_model(model='default')#

Callable function attribute to get the model’s tables.

arte.photometry.n_phot.n_phot(mag: float, band: str = None, surf: float = 1.0, delta_t: float = 1.0, lambda_: float = None, width: float = None, e0: float = None, back_mag: float = None, model: str = 'default', verbose: bool = False)#

This routine computes from a source magnitude the corresponding number of photons for a given band, a given surface and a given time interval. This is returned together with the number of photons from the sky background. The chosen band can be either a Johnson one (from U to M, but also a default Na-band), or a user-defined one (specifying the central wavelength and the bandwidth). The routine can also return the model used for calculations, if the attribute get_model() is called (see examples #4 and #5).

TODO c in the code is approximated as 3e8

INPUTS:

mag = magnitude [float]

KEYWORDS:

band = wavelength Johnson band or Na default band [str]. delta_t = integrating time [s] [float], default is 1s. surf = integrating surface [m^2] [float], default is 1m^2. lambda_ = central wavelenght of the choosen band [m] [float]. width = bandwidth of the choosen band [m] [float]. e0 = A0 0-magnitude star brightness in the choosen band,

[J/s/m^2/um] [float].

back_mag = sky background default magnitude [FLOAT]. model = use the specified model instead the the default one (Lena 96).

Available model are: ‘MAORY-1’ (phase A of Maory MCAO-EELT)

OUTPUTS:

Tuple with 2 elements:

nb_of_photons = the computed source number of photons [float] background = the computed sky background nb of photons per arcsec^2 [float]

SIDE EFFECTS:

none.

RESTRICTIONS:

none.

EXAMPLES:
[1]: compute the number of photons coming from a 5-mag star

observed in V-band, with 8m-diameter telescope and an integration time of 12s:

nb_of_photons, background = n_phot(5.,

band=’V’, surf=math.pi*(8.**2)/4, delta_t=12.)

returns:

nb_of_photons = 5.9521160e+10 photons background = 63581.948 photons

[2]: compute the same stuff but with a user-defined sky background

of 19.5-mag:

nb_of_photons, background = n_phot(5.,

band=’V’, surf=math.pi*(8.**2)/4, delta_t=12., back_mag=19.5)

returns:

nb_of_photons = 5.9521160e+10 photons background = 100549.18 photons

[3]: compute the same stuff but with a user-defined band of

central wavelength 0.54um and a narrow bandwidth of 0.01um:

nb_of_photons, background = n_phot(5.,

lambda_=5.4E-7, width=1E-8, surf=math.pi*(8.**2)/4, delta_t=12., back_mag=19.5)

returns:

nb_of_photons = 6.5661736e+09 photons background = 11092.246 photons

[4]: get the sky background default magnitudes table:

model = n_phot.getmodel() model.back_mag_table

returns:

back_mag_table= [22.,21.,20.,19.,17.5,16.,14.,12.,10.,6.,23.5]

[5]: get the bands, central wavelengths, bandwidths, A0 0-mag. star

brightnesses, and sky background default magnitudes tables:

model = n_phot.getmodel()

returns:

model.band_table =

[ “U”, “B”, “V”, “R”, “I”, “J”, “H”, “K”, “L”, “M”, “Na”]

model.lambda_table =

[3.6e-7,4.4e-7,5.5e-7, 7e-7, 9e-7,1.3e-6,1.7e-6,2.2e-6,3.4e-6, 5e-06,5.89e-7]

model.width_table =

[6.8e-8,9.8e-8,8.9e-8,2.2e-7,2.4e-7, 3e-7,3.5e-7, 4e-7,5.5e-7, 3e-7, 1e-8]

model.e0_table =

[4.4e-8,7.2e-8,3.9e-8,1.8e-8,8.3e-9,3.4e-9, 7e-10, 4e-10, 8e-11,2.2e-11, 3.9e-8]

model.back_mag_table=

[ 23., 22., 21., 20., 19.5, 14., 13.5, 12.5, 3., 0., 23.]

RESTRICTIONS:

in the case that user-defined bandwidth (keyword width) and wavelength (keyword lambda_) are set, it cannot extend beyond a routine-defined band. otherwise the results (nb_of_photons and background) are wrong.

MODIFICATION HISTORY:
program written: october 1998,

Marcel Carbillet (OAA) [marcel@arcetri.astro.it].

modificationsmarch 1999,
Marcel Carbillet (OAA) [marcel@arcetri.astro.it]:
  • help completed.

  • background output stuff added.

august 2015
Guido Agapito (OAA) [agapito@arcetri.astro.it]
  • added DOUBLE keyword

  • added verbose keyword

  • where and closest like function to find the band/lambda

may 2019
Alfio Puglisi (OAA) [alfio.puglisi@inaf.it]
  • translated to Python

  • removed DOUBLE keyword