lightcurvelynx.astro_utils.pzflow_node
A wrapper around pzflow sampling.
For the full pzflow package see: https://github.com/jfcrenshaw/pzflow
Classes
A node that wraps sampling from pzflow. |
Module Contents
- class PZFlowNode(flow_obj, node_label=None, **kwargs)[source]
Bases:
lightcurvelynx.base_models.FunctionNode,citation_compass.CiteClassA node that wraps sampling from pzflow.
References
Paper: Crenshaw et. al. 2024 - https://ui.adsabs.harvard.edu/abs/2024AJ….168…80C
Zenodo: Crenshaw et. al. 2024 - https://doi.org/10.5281/zenodo.10710271
- flow[source]
The object from which to sample.
- Type:
pzflow.flow.Flow or pzflow.flowEnsemble.FlowEnsemble
- conditional_cols
The names of the conditional columns used when sampling the flow.
- Type:
list of str
- classmethod from_file(filename, node_label=None, **kwargs)[source]
Create a PZFlowNode from a saved flow file.
- Parameters:
filename (str or Path) – The location of the saved flow.
node_label (str) – An optional human readable identifier (name) for the current node.
**kwargs (dict, optional) – Additional function arguments, including the input parameters for the flow.
- compute(graph_state, rng_info=None, **kwargs)[source]
Return the given values.
- Parameters:
graph_state (GraphState) – An object mapping graph parameters to their values. This object is modified in place as it is sampled.
rng_info (numpy.random._generator.Generator, optional) – Unused in this function, but included to provide consistency with other compute functions.
**kwargs (dict, optional) – Additional function arguments.
- Returns:
results – The result of the computation. This return value is provided so that testing functions can easily access the results.
- Return type:
any