Skip to content

TwoPhaseMethod

frads.TwoPhaseMethod

TwoPhaseMethod(config)

Bases: PhaseMethod

Implements two phase method.

Initializes the two phase method

Parameters:

Name Type Description Default
config WorkflowConfig

A WorkflowConfig object

required

calculate_sensor

calculate_sensor(sensor, time, dni, dhi)

Calculate a sensor view.

Parameters:

Name Type Description Default
sensor str

A sensor name, must be loaded during configuration.

required
time datetime

A datetime object

required
dni float

Direct normal irradiance

required
dhi float

Diffuse horizontal irradiance

required

Returns: Sensor illuminance value

calculate_sensor_from_wea

calculate_sensor_from_wea(sensor)

Calculate a sensor for tue duration of the weather file that's loaded during configuration.

Parameters:

Name Type Description Default
sensor str

sensor name, must be loaded during configuration.

required

Returns: A numpy array containing a series of illuminance values

calculate_view

calculate_view(view, time, dni, dhi)

Calculate (render) a view. Args: view: A view name, must bed loaded during configuration. time: A datetime object dni: Direct normal irradiance dhi: Diffuse horizontal irradiance Returns: A image as a numpy array

calculate_view_from_wea

calculate_view_from_wea(view)

Render a series of images for a view. Rendering using the weather file loaded during configuration.

Parameters:

Name Type Description Default
view str

View name, must be loaded during configuration.

required

Returns: A numpy array containing a series of images

generate_matrices

generate_matrices()

Generate matrices for all view and sensor points.

load_matrices

load_matrices()

Load matrices from a .npz file

save_matrices

save_matrices()

Save matrices to a .npz file in the Matrices directory. File name is the hash string of the configuration.