class bifacial_radiance.RadianceObj(name=None, path=None, hpc=False)[source]

The RadianceObj top level class is used to work on radiance objects, keep track of filenames, sky values, PV module configuration, etc.

  • name (text to append to output files) –

  • filelist (list of Radiance files to create oconv) –

  • nowstr (current date/time string) –

  • path (working directory with Radiance materials and objects) –

__init__ : initialize the object
_setPath : change the working directory
__init__(name=None, path=None, hpc=False)[source]

initialize RadianceObj with path of Radiance materials and objects, as well as a basename to append to

  • name (string, append temporary and output files with this value) –

  • path (location of Radiance materials and objects) –

  • hpc (Keeps track if User is running simulation on HPC so some file) – reading routines try reading a bit longer and some writing routines (makeModule) that overwrite themselves are inactivated.




__init__([name, path, hpc])

initialize RadianceObj with path of Radiance materials and objects, as well as a basename to append to

addMaterial(material, Rrefl, Grefl, Brefl[, ...])

Function to add a material in Radiance format.

analysis1axis([trackerdict, singleindex, ...])

Loop through trackerdict and runs linescans for each scene and scan in there.

appendtoScene([radfile, customObject, text])

Appends to the Scene radfile in folder objects the text command in Radiance lingo created by the user.

exportTrackerDict([trackerdict, savefile, ...])

Use _exportTrackerDict() to save a TrackerDict output as a csv file.

genCumSky([gencumsky_metfile, savefile])

Generate Skydome using gencumsky.


1-axis tracking implementation of gencumulativesky.

gendaylit(timeindex[, metdata, debug])

Sets and returns sky information using gendaylit.

gendaylit1axis([metdata, trackerdict, ...])

1-axis tracking implementation of gendaylit.

gendaylit2manual(dni, dhi, sunalt, sunaz)

Sets and returns sky information using gendaylit.

getEPW([lat, lon, GetAll])

Subroutine to download nearest epw files to latitude and longitude provided, into the directory EPWs based on github/aahoo.

getSingleTimestampTrackerAngle(metdata, ...)

Helper function to calculate a tracker's angle for use with the fixed tilt routines of bifacial_radiance.


Return concat of matfiles, radfiles and skyfiles

loadtrackerdict([trackerdict, fileprefix])

Use bifacial_radiance.load._loadtrackerdict to browse the results directory and load back any results saved in there.

makeCustomObject([name, text])

Function for development and experimenting with extraneous objects in the scene.

makeModule([name, x, y, z, modulefile, ...])

pass module generation details into ModuleObj().

makeOct([filelist, octname])

Combine everything together into a .oct file

makeOct1axis([trackerdict, singleindex, ...])

Combine files listed in trackerdict into multiple .oct files

makeScene([module, sceneDict, radname, ...])

Create a SceneObj which contains details of the PV system configuration including tilt, row pitch, height, nMods per row, nRows in the system...

makeScene1axis([trackerdict, module, ...])

Creates a SceneObj for each tracking angle which contains details of the PV system configuration including row pitch, hub_height, nMods per row, nRows in the system...


readWeatherFile([weatherFile, starttime, ...])

Read either a EPW or a TMY file, calls the functions readTMY or readEPW according to the weatherfile extention.


Return files in the Materials directory with .rad extension appends materials files to the oconv file list


Return files in the root directory with .oct extension


Pickle the radiance object for further use.

set1axis([metdata, azimuth, limit_angle, ...])

Set up geometry for 1-axis tracking.

setGround([material, material_file])

Use GroundObj constructor class and return a ground object