phase_curve_tools package

Submodules

phase_curve_tools.bestFit module

class phase_curve_tools.bestFit.BestFit(mags, errors=None, helioDist=None, obsDist=None, phaseAngle=None, times=None, objectID=None)[source]

Bases: object

Class to find the best fit in the Bowell HG system.

If the helioDist nor obsDist is provided, then Horizons will be queried, so the object ID and times are needed. They don’t have to be provided if helioDist and obsDist are provided.

If no phase angles are provided, then they will be computed, assuming the distance from the observer/Earth to the Sun is always 1 AU.

Parameters
  • mags (np.ndarray) – The magnitudes of the observations

  • errors (np.ndarray, optional) – The errors of the magnitudes, defaults to None

  • helioDist (np.ndarray, optional) – The distance from the Sun to the object (AU), defaults to None

  • obsDist (np.ndarray, optional) – The distance from the Observer/Earth to the object (AU), defaults to None

  • phaseAngle (np.ndarray, optional) – The phase angle of the observations (deg), defaults to None

  • times (np.ndarray, optional) – The times of the observations (JD), defaults to None

  • objectID (Union[str, int], optional) – The object ID, needs to be compatable with JPL Horizons, defaults to None

Raises

ValueError – Needs the object ID and the times of the observations if helioDist or obsDist is not provided

static calcPhaseAngle(helioDist, obsDist, sunObsDist=1)[source]

calcPhaseAngle Calculate the phase angles. To calculate the s-t-o phase angle, using the law of cosines:

\[\alpha=\cos^{-1}\left(\dfrac{\Delta^2+r^2-d^2}{2\Delta{r}}\right)\]

where \(\Delta\) is the heliocentric distance, \(r\) is the observer/Earth distance, and \(d\) is the distance from the observer/Earth to the Sun.

Parameters
  • helioDist (np.ndarray) – The heliocentric distance (AU)

  • obsDist (np.ndarray) – The observer distance (AU)

  • sunObsDist (Union[np.ndarray, float], optional) – The distance from the observer/Earth to the Sun (AU), defaults to 1

Returns

The phase angles (deg)

Return type

np.ndarray

fitHG(H_0=None, G_0=0.15, HRange=(4.69236933828342, 29.276432904419803), GRange=(- 0.301744075798055, 0.9073912874142601), errorSimulation=30)[source]

fitHG Fit the data to the Bowell HG system1.

If errors are provided, then \(\sigma_H,\sigma_G\) will be generated with the reduced magnitudes being shifited with the normal distribution with \(\sigma\) is the error of the observations.

Parameters
  • H_0 (float, optional) – The initial H guess, if None, then will use the reduced magnitude at the minimum phase angle, defaults to None

  • G_0 (float, optional) – The inital G guess, defaults to .15

  • HRange (Tuple, optional) – The valid range for H values, defaults to (4.69236933828342, 29.276432904419803), which are \(\pm10\%\) the values from Vereš et al.2

  • GRange (Tuple, optional) – The valid range for G values, defaults to (-0.301744075798055, 0.9073912874142601), which are \(\pm10\%\) the values from Vereš et al.2

Returns

The result of the fit

Return type

HGResult

class phase_curve_tools.bestFit.HGResult(H, G, sigH=0, sigG=0, success=False, atEdge=False)[source]

Bases: object

Class for hoding the reult of HG minimumzation

Parameters
  • H (float) – The Bowell H value

  • G (float) – The Bowell G value

  • sigH (float) – The error in the Bowell H value

  • sigG (float) – The error in the Bowell G value

  • success (bool) – If the minimization succedded (according to scipy)

  • atEdge (bool) – If the derived G value is at the edge of the porvided G bounds

G: float
H: float
atEdge: bool = False
property fullSuccess: bool

fullSuccess If the minimzation succeded and the G value is not at an edge

Getter

Returns if there was a full succedd

Type

bool

Return type

bool

sigG: float = 0
sigH: float = 0
success: bool = False

phase_curve_tools.hg module

phase_curve_tools.hg.bowellCalcAbsMag(apmag, helioDist, obsDist, phaseAngle, G, simple=True)

Calculate the absolute mags for an object from the Bowell HG system1

Parameters
  • apmag (np.ndarray) – The apparent magnitudes to use

  • helioDist (np.ndarray) – The distance from the object to the Sun (AU)

  • obsDist (np.ndarray) – The distance from the object to the Observer/Earth (AU)

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

  • G (float) – The Bowell G value

  • simple (bool) – If to use the simple or other version of \(\phi\) calculations. The usual version used is the simple version. defaults to True

Returns

The absolute magnitudes for the observations.

Return type

np.ndarray

phase_curve_tools.hg.calcPhaseCurve(H, G, phaseAngle)

Calculate the reduced magnitudes, the Bowell HG system1 for the given phase angles.

Will use the non-simple \(\phi_1,\phi_2\) calculations

Parameters
  • H (float) – The Bowell H value

  • G (float) – The Bowell G value

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

Returns

The reduced magnitudes

Return type

valid_arg

phase_curve_tools.hg module

phase_curve_tools.hg.bowellCalcAbsMag(apmag, helioDist, obsDist, phaseAngle, G, simple=True)

Calculate the absolute mags for an object from the Bowell HG system1

Parameters
  • apmag (np.ndarray) – The apparent magnitudes to use

  • helioDist (np.ndarray) – The distance from the object to the Sun (AU)

  • obsDist (np.ndarray) – The distance from the object to the Observer/Earth (AU)

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

  • G (float) – The Bowell G value

  • simple (bool) – If to use the simple or other version of \(\phi\) calculations. The usual version used is the simple version. defaults to True

Returns

The absolute magnitudes for the observations.

Return type

np.ndarray

phase_curve_tools.hg.calcPhaseCurve(H, G, phaseAngle)

Calculate the reduced magnitudes, the Bowell HG system1 for the given phase angles.

Will use the non-simple \(\phi_1,\phi_2\) calculations

Parameters
  • H (float) – The Bowell H value

  • G (float) – The Bowell G value

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

Returns

The reduced magnitudes

Return type

valid_arg

phase_curve_tools.hg module

phase_curve_tools.hg.bowellCalcAbsMag(apmag, helioDist, obsDist, phaseAngle, G, simple=True)

Calculate the absolute mags for an object from the Bowell HG system1

Parameters
  • apmag (np.ndarray) – The apparent magnitudes to use

  • helioDist (np.ndarray) – The distance from the object to the Sun (AU)

  • obsDist (np.ndarray) – The distance from the object to the Observer/Earth (AU)

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

  • G (float) – The Bowell G value

  • simple (bool) – If to use the simple or other version of \(\phi\) calculations. The usual version used is the simple version. defaults to True

Returns

The absolute magnitudes for the observations.

Return type

np.ndarray

phase_curve_tools.hg.calcPhaseCurve(H, G, phaseAngle)

Calculate the reduced magnitudes, the Bowell HG system1 for the given phase angles.

Will use the non-simple \(\phi_1,\phi_2\) calculations

Parameters
  • H (float) – The Bowell H value

  • G (float) – The Bowell G value

  • phaseAngle (np.ndarray) – The phase angle, the sun - object - observer angle (degrees)

Returns

The reduced magnitudes

Return type

valid_arg

phase_curve_tools.reducedMag module

phase_curve_tools.reducedMag.calcReducedMag(mag, helioDist, obsDist)

Calculate teh reduced magnitude ..math:

V(alpha) = m - 5log10(Delta r)

Parameters
  • mag (np.ndarray) – The magnitudes of the observations

  • helioDist (np.ndarray) – The heliocentric distances

  • obsDist (np.ndarray) – The observer/Earth distances

Returns

The reduced magnitudes

Return type

np.ndarray

phase_curve_tools.reducedMag module

phase_curve_tools.reducedMag.calcReducedMag(mag, helioDist, obsDist)

Calculate teh reduced magnitude ..math:

V(alpha) = m - 5log10(Delta r)

Parameters
  • mag (np.ndarray) – The magnitudes of the observations

  • helioDist (np.ndarray) – The heliocentric distances

  • obsDist (np.ndarray) – The observer/Earth distances

Returns

The reduced magnitudes

Return type

np.ndarray

phase_curve_tools.reducedMag module

phase_curve_tools.reducedMag.calcReducedMag(mag, helioDist, obsDist)

Calculate teh reduced magnitude ..math:

V(alpha) = m - 5log10(Delta r)

Parameters
  • mag (np.ndarray) – The magnitudes of the observations

  • helioDist (np.ndarray) – The heliocentric distances

  • obsDist (np.ndarray) – The observer/Earth distances

Returns

The reduced magnitudes

Return type

np.ndarray

phase_curve_tools.useAstroQuery module

class phase_curve_tools.useAstroQuery.HorAbsMags(mags, *args, **kwargs)[source]

Bases: astroquery.jplhorizons.core.HorizonsClass

Wrapper for astroquries Horizons class. can calculate the absolute magnitude.

Parameters

mags (np.ndarray) – The mags of observations at the provided ephocs

calcAbsMag(absMagCalcFunc=<cyfunction bowellCalcAbsMag>, G=None)[source]

calcAbsMag Function to calculate the absolute magnitudes. Will grab the data from horizons

Parameters
  • absMagCalcFunc (Callable, optional) – The function that calcualtes the absolute magnitude, defaults to HG

  • G (float, optional) – The G value to use. Use None if using the value from horizons, defaults to None

Returns

The absolute magnitudes for the observations.

Return type

np.ndarray

getLightTimeCorrection(outputUnit=Unit('d'))[source]

getLightTimeCorrection Calculate the light time corrction for the observations

Parameters

outputUnit (u, optional) – The output unit to use, defaults to u.day

Returns

The light time correction for each ephoch

Return type

np.ndarray

Module contents

Top-level package for Phase Curve Tools.

1(1,2,3,4,5,6,7)

Edward Bowell, Bruce Hapke, Deborah Domingue, Kari Lumme, Jouni Peltoniemi, and Alan W. Harris. Application of photometric models to asteroids. In Richard P. Binzel, Tom Gehrels, and Mildred Shapley Matthews, editors, Asteroids II, 524–556. January 1989.

2(1,2)

Peter Vereš, Robert Jedicke, Alan Fitzsimmons, Larry Denneau, Mikael Granvik, Bryce Bolin, Serge Chastel, Richard J. Wainscoat, William S. Burgett, Kenneth C. Chambers, Heather Flewelling, Nick Kaiser, Eugen A. Magnier, Jeff S. Morgan, Paul A. Price, John L. Tonry, and Christopher Waters. Absolute magnitudes and slope parameters for 250,000 asteroids observed by Pan-STARRS PS1 - Preliminary results. \icarus , 261:34–47, November 2015. arXiv:1506.00762, doi:10.1016/j.icarus.2015.08.007.