Z_MP9901

utilipy.astro.instruments.filtertransforms.MegaCam_PanSTARRS.Z_MP9901(ps, g='g', i='i', z='z', gmi='g-i', *, unit: Optional[astropy.units.Unit] = None, to_value: bool = False, equivalencies: Sequence = [], decompose: Union[bool, Sequence] = False, assumed_units: dict = {}, _skip_decorator: bool = False, **kw)[source]

Convert Pan-STARRS1 bands to CFHT Z-MP9901 band.

Parameters
ps: astropy Table

need: z col either: (g & i), g-i col

g: str

(default ‘g’) i column name

i: str

(default ‘i’) i column name

z: str

(default ‘z’) z column name

gmi: str

(default ‘g-i’) g-i column name

Returns
Z_MP9901Quantity array_like

CFHT z-band

Other Parameters
unitastropy Unit or Quantity or str

sets the unit for the function evaluation. (default None) must be astropy-compatible unit specification. equivalent to func(*args, **kw).to(unit) if None, skips unit conversion. function arguments override decorator and function annotation arguments

to_valuebool

whether to return .to_value(unit) (default False) see astropy.units.Quantity.to_value function arguments override decorator and function annotation arguments

equivalencieslist

equivalencies for any units provided (default []) used by .to() and .to_value() function arguments override decorator and function annotation arguments

decomposebool or list

Decompose the unit into base units, can provide base as list. (default []) function arguments override decorator and function annotation arguments if bool, then do/don’t decompose if list, bases for .decompose(bases=[]) will first decompose, then apply unit, to_value, equivalencies

Decomposing then converting wastes time, since to(unit, equivalencies) internally does conversions. The only use for combining decompose with other params is with:

unit=None, to_value=True, equivalencies=[], decompose=[bases]

since this will decompose to desired bases then return the value

Note

for things which are not (u.Unit, u.core.IrreducibleUnit), tries wrapping in Unit() this allows things such as:

>>> x = 10 * u.km * u.s
>>> bases = [u.Unit(2 * u.km), u.s]
>>> x.decompose(bases=bases) 
<Quantity 5. 2 km s>

(this would normally return an error)

assumed_units: dict

dictionary of default units (default {})

>>> from utilipy.units.decorators import QuantityInputOutput
>>> dfu = {'x': u.km}
>>> x = 10
>>> y = 20*u.km
>>> @QuantityInputOutput.as_decorator(assumed_units=dfu)
... def add(x, y):
...     return x + y
>>> add(x, y) 
<Quantity 30.0 km>

Notes

\[z_{CFHT} = z_{PS} - .016 - .069 gmi + .0239 gmi^2 - .0056 gmi^3\]

where \(gmi \equiv g_{PS}-i_{PS}\) in the range \(-1 \rm{mag} < g-i < 4 \rm{mag}\)

filter transformations from Pan-STARRS to MegaCam plots. 4th row, 2nd plot.