pvdeg.utilities#

utilities.py.

Function Overview#

pvdeg.utilities.add_time_columns_tmy

Add time columns to a tmy weather dataframe.

pvdeg.utilities.compare_templates

Compare loaded datasets with "empty-like" values.

pvdeg.utilities.convert_tmy

Read a older TMY-like weather file and convert to h5 for use in pvdeg.

pvdeg.utilities.display_json

Interactively view a 2 level JSON file in a JupyterNotebook.

pvdeg.utilities.fix_metadata

Meta gid was appearing with ('lat' : {gid: lat}, 'long' : {gid: long}), ...

pvdeg.utilities.geospatial_from_csv

Create an xarray dataset contaning aeospatial and geospatial weather/meta data.

pvdeg.utilities.get_kinetics

Return a list of LETID/B-O LID kinetic parameters from DegradationDatabase.json.

pvdeg.utilities.get_state_bbox

Retrieve top left and bottom right coordinate pairs for state bounding boxes.

pvdeg.utilities.gid_downsampling

Downsample the NSRDB GID grid by a factor of n.

pvdeg.utilities.gids_dataset_to_coords_dataset

Convert dataset gids to gridded latitude, longitude dataset.

pvdeg.utilities.linear_normalize

Normalize a non-negative input array.

pvdeg.utilities.merge_sparse

Merge an arbitrary number of geospatial analysis results.

pvdeg.utilities.meta_as_dict

Turn a numpy recarray record into a dict.

pvdeg.utilities.new_id

Generate a 5 uppercase letter string unqiue from all keys in a dictionary.

pvdeg.utilities.nrel_kestrel_check

Check if the user is on Kestrel HPC environment.

pvdeg.utilities.optimal_gcr_pitch_bifacial_fixed_tilt

Compute the optimal ground coverage ratio (GCR) and row pitch for

pvdeg.utilities.practical_gcr_pitch_bifiacial_fixed_tilt

Calculate pitch for fixed tilt systems for InSPIRE Agrivoltaics Irradiance Dataset.

pvdeg.utilities.quantile_df

Calculate the quantile of each parameter at each location.

pvdeg.utilities.read_material

Read material dictionary and return parameter dictionary in normalized format.

pvdeg.utilities.read_material_property

Read material parameters from a pvdeg/data file or JSON file path.

pvdeg.utilities.remove_scenario_filetrees

Move cwd to fp and remove all scenario file trees from fp directory.

pvdeg.utilities.search_json

Search through 2 level JSON.

pvdeg.utilities.strip_normalize_tmy

Normalize the DataFrame, extract data between start and end times.

pvdeg.utilities.tilt_azimuth_scan

Calculate minimum standoff distance for roof-mounted PV systems.

pvdeg.utilities.ts_gid_df

Extract the time series of each parameter for given location.

pvdeg.utilities.write_gids

Generate a .CSV file containing the GIDs for the spatial test range.