sasagroups.blogg.se

Soltrace exampe
Soltrace exampe











soltrace exampe
  1. Soltrace exampe install#
  2. Soltrace exampe update#

# st = SolTrack(geoLon, geoLat, useDegrees=True, useNorthEqualsZero=False, computeRefrEquatorial=True, # computeDistance=True) st = SolTrack ( geoLon, geoLat, useDegrees = True ) # Same as above, using default values for all but useDegrees. # - computeDistance: compute the physical Eart-Sun distance in AU. # - computeRefrEquatorial: compute refraction-corrected equatorial coordinates. # - useNorthEqualsZero: Set an azimuth of 0 to mean north instead of south. Example use for SolTrack v0.1.0 or later """Example Python script to compute the position of the Sun and its rise and set times for a single instant and demonstrate some other features.""" from soltrack import SolTrack import datetime as dt # Set the geographic location to Arnhem, the Netherlands: geoLon = 5.950270 # Positive -> east of Greenwich (degrees) geoLat = 51.987380 # Positive -> northern hemisphere (degrees) # Create a SolTrack instance and specify preferences (the first two are False by default): # - useDegrees: use degrees instead of radians for input (geographic location) and output (position). Variables are now called rightAscensionUncorr, declinationUncorr and _altitudeUncorr. The refraction-corrected variables declinationRefract, hourAngleRefract,ĪzimuthRefract and altitudeRefract have lost their Refract postfix. The output used to be stored in attributes of the loc, time, pos and riseSet objects, but these are computeRiseSet () # Compute rise and set times computePosition () # Compute position st. computeSunRiseSet ( loc, time, 0.0, useDegrees = True, useNorthEqualsZero = True ) # Compute rise and set times # Starting with v0.1.0: from soltrack import SolTrack st = SolTrack ( 5.950270, 51.987380, useDegrees = True, useNorthEqualsZero = False, computeRefrEquatorial = True, computeDistance = True ) # Create a SolTrack instance and specify preferences st. computeSunPosition ( loc, time, useDegrees = True, useNorthEqualsZero = True, computeRefrEquatorial = True, computeDistance = True ) # Compute positions riseSet = st. The main sequence of statements has changed as follows: # Before v0.1.0: import soltrack as st loc = st. In addition, the parameters computeRefrEquatorial and computeDistance are now True Renaming of two functions ( computeSunPosition() -> computePosition() and computeSunRiseSet() ->ĬomputeRiseSet()). To help achieving that, we have made some smaller changes in the same update, like a Oriented, which should not affect its performance, but does affect its use.

Soltrace exampe update#

The update from SolTrack v0.0.2 to v0.1.0 is not backwards compatible. If you are installing by hand, ensure that these packages are installed as well. Packages numpy, pytz and dataclasses (if you're not using Python 3.7+) if they haven't been installedĪlready.

Soltrace exampe install#

This should automatically install the dependency This package can be installed using pip install soltrack. SolTrack has been used to control solar trackers, as well as for Slower than pyEphem, which is written in C. This makes it about 500x times faster than astropy, but around 50x SolTrack performs about 12340 position calculations per second on a single 3.6 GHz core of my 2013 laptop, TheĬode has now been translated to pure Python. Sustainable energy research group of the HAN University of Applied Sciences in Arnhem, the Netherlands. Research group of the HAN University of Applied Sciences in Arnhem, the Netherlands, and Paul van Kan of the SolTrack was originally written in C/C++ by Marc van der Sluys of theĭepartment of astrophysics of the Radboud University Nijmegen, the Netherlands and the Sustainable energy A free, fast and simple Python package to compute the position of the Sun, as well as its rise and set times.













Soltrace exampe