raytraverse.api¶
factory functions for easy api access raytraverse.
- raytraverse.api.get_config(config, com='raytraverse_')[source]¶
load a config file into a dict
- Parameters
config (str) – path to .cfg file with sections raytarverse_*
com (str) – basename of commands in .cfg file
- Returns
result
- Return type
dict
- raytraverse.api.auto_reload(scndir, area, areaname='plan', skydata='skydata', ptres=1.0, rotation=0.0, zheight=None)[source]¶
reload associated class instances from file paths
- Parameters
scndir (str) – matches outdir argument of Scene()
area (str np.array) – radiance scene geometry defining a plane to sample, tsv file of points to generate bounding box, or np.array of points.
areaname (str, optional) – matches name argument of PlanMapper()
skydata (str, optional) – matches name argument of SkyData.write()
ptres (float, optional) – resolution for considering points duplicates, border generation (1/2) and add_grid(). updateable
rotation (float, optional) – positive Z rotation for point grid alignment
zheight (float, optional) – override calculated zheight
- Returns
Scene
PlanMapper
SkyData
- raytraverse.api.load_lp(path, hasparent=True)[source]¶
load a lightpoint from a file
will try to get appropriate scene/zone information from file path but reverts to a lightpoint without correct meta-data if it does not have the appropriate nesting.
- Parameters
path (str) – relative path to .rytpt file
hasparent (bool, optional) – was sampled within a zone (typical), set to false in the case that the lightpoint file is multiple folders deep from CWD but was not sampled within a zone (meaning you used a samplerpt class, not typical).
- Return type