Package: pv-system-profiler
pv-system-profilerEstimating PV array location and orientation from real-world power datasets.Latest ReleaseLicenseBuild StatusCode QualityPublicationsPyPI DownloadsConda DownloadsInstall & Setup1) Recommended: Set upcondaenvironment with provided.ymlfileWe recommend setting up a fresh Python virtual environment in which to usepv-system-profiler. We recommend using theCondapackage management system, and creating an environment with the environment configuration file namedpvi-user.yml, provided in the top level of this repository. This will install thestatistical-clear-skyandsolar-data-toolspackages as well.Creating the env:$condaenvcreate-fpvi-user.ymlStarting the env:$condaactivatepvi_userStopping the env$condadeactivateAdditional documentation on setting up the Conda environment is availablehere.2) PIP Package$pipinstallpv-system-profilerAlternative: Clone repo from GitHubMimic the pip package by setting up locally.$pipinstall-epath/to/root/folder3) Anaconda Package$condainstall-cslacgismopv-system-profilerSolver DependenciesRefer tosolar-data-toolsdocumentation to get more info about solvers being used.Usage / Run ScriptsSerial runTheparameter_estimation_script.pyscript creates a report of all systems based on thecsvfiles with the system signals located in a given folder.
The script takes all input parameters askwargs. The example below illustrates the use of report_script:python'repository location of run script'/parameter_estimation_script.pyreportNonealls3://s3_bucket_with_signals/'repeating_part_of label'/home/results.csvTrueFalseFalseFalses3://'s3_path_to_file_containing_metadata/metadata.csv'Nones3In the example above the full path toparameter_estimation_script.pyis specified to run areport. The script allows to provide acsvfile with list of sites to be analyzed. In this case no list is provided
and therefore thekwargNoneis entered. The script also allows to run an analysis on the firstn_filescontaining
input signals in thes3repository. In this, case theallkwargspecifies that all input signals are to be analyzed.
In this example, allcsvfiles containing the input signals are located in thes3bucket with the names3://s3_bucket_with_signals/. Usually thesecsvfiles are of the formID_repeating_part_of_label.csv, for example:1_composite_10.csv,2_composite_10.csv, where_composite_10is the repeating part of the label. The repeating part
of the label is either None or a string as in the example above. Next, an absolute path to the desired location of the
results file is provided, in this case/home/results.csv. The two followingkwargsare type Boolean and are used to set the
values of thecorrect_tzandfix_shiftspipelinekwargs. The nextkwarg,check_jsonis also Boolean. It
is used to indicate if  there is ajsonfile present ins3://s3_bucket_with_signals/with additional site information
that is  to be analyzed. The next Booleankwargis used to set theconvert_to_tskwargwhen instantiating the data
handler.  The nextkawrgcontains the full path to thecsvfile containing site metadata, here calledmetadata.csv.
The information that this file should contain varies depending on theestimationto be performed. This file is
optional and thekwargcan be set toNone. For the case of areport, acsvfile with columns labeledsite,systemandgmt_offsetand their respective values need to be provided. Alternatively, if thegmt_offsetkwarg,
the nextkwarg(in the example above set toNone), has a numeric
value different toNone, all sites will use that single value when running the report. For the case of thereportestimation, the metadata file should containsite,systemandgmt_offsetcolumns with the respective
values for each system. For the case of thelongitudeestimation, the metadata file should containsite,systemandlatitudecolumns with the respective values for each system. For the case of thetilt_azimuthestimation, the
metadata file should containsite,system,gmt_offset,estimated_longitudeandestimated_latitude,tilt,azimuthcolumns and with the respective values for each system. Additionally, if a manual inspection for time shifts
was performed, another
column labeledtime_shift_manualhaving a zero for systems with no time shift and ones for systems with time shift
may be included. If atime_shift_manualcolumn is included, it will be used to determine whether thefix_dst()method is run after instantiating the data handler. The nextkarg isgmt_offsetand in this case it is set to None.
The last kwarg corresponds to thedata_source. In this case the value iss3since files with the input signals are
located in ans3bucket.Partitioned runA script that runs the site report, the longitude, latitude and tilt and azimuth scripts using a number of prescribed
Amazon Web Services (AWS), instances is provided. The script reads the folder containing the system signals and
partitions these signals to run in  anuser prescribed AWS instances in parallel. Here is an example shell command
for a partitioned run:python'repository location of run script'/run_partition_script.pyparameter_estimation_script.pyreportNonealls3://s3_bucket_with_signals/'repeating_part_of label'/home/results.csvTrueFalseFalseFalses3://'s3_path_to_file_containing_metadata/metadata.csv'Nones3'repository location of run script'/parameter_estimation_script.pypvi-devmy_instancewhere the individual value of each kwarg are defined in run_partition_script.py. This script takes the same inputs as
theparameter_estimation_script.pyplus three additional parameters. Note that the first kwarg is the partitioning
script repository location of run script/run_partition_script.py parameter_estimation_script.py. The estimation run
script/parameter_estimation_script.pis specified as the third to last kwarg. The second to last kwarg is the conda
enviroment to be used to run the estimation, in this casepvi-dev. The last kwarg is the name of the AWS instances to
be used to runrun_partition_script.py, in this casemy_instance. Previous to running this command it is necessary to createnidentical AWS
instances that correspond to the number of desired partitions. These instances need to have the sameName='instance name'AWS tag. The simplest way to accomplish this is by parting from an AWS  image of a  previously
configured instance. This image needs to have all the  repositories and conda environments that
would be  needed in a serial run. Once each partitioned run is finished, results will be automatically collected in the
local folder whererun_partition_script.pywas run.Unit testsIn order to run unit tests:python -m unittest -vTest CoverageIn order to view the current test coverage metrics:coverage run --source pvsystemprofiler -m unittest discover && coverage html
open htmlcov/index.htmlVersioningWe useSemantic Versioningfor versioning. For the versions available, see thetags on this repository.LicenseThis project is licensed under the BSD 2-Clause License - see theLICENSEfile for details