Usefull methods regarding time, sun, math, strings and CSV format for
crepyscule module.
Project home page is
| Function Summary |
| tuple
|
check_value_over_24(lSunset)
Check the value of sunset to see if there is some values over 24. |
| tuple
|
check_value_under_0(lSunrise)
Check the value of sunset to see if there is some values over 24. |
| tuple
|
correct_sun_bugs(lSunrise,
lSunset)
Correct some bugs related to time of Sun file. |
| string
|
ctime_to_iso8601(ctime)
Convert a ctime value in iso8601. |
| list
|
get_daylength(ctime,
fLat,
fLon)
Get the daylength for all the year corresponding to this ctime. |
| float
|
get_daylength_day(ctime,
fLat,
fLon)
Get the daylength for the day corresponding to this ctime. |
| list
|
get_daylight_variation(lDaylightInOneDay)
Compute the time gained or lost for each day. |
| list
|
get_daylight_variation_as_csv(lDateISO8601,
lDaylength1,
fLat1,
lDaylength2,
fLat2)
Returns a list containing the date and the daylight variation in
minutes. |
| dictionnary
|
get_dictionary(sValue,
fLat,
fLon,
ctime,
fUTC,
sSummerTime)
Compute the values indicated by sValue and return a dictionnary with
the date in iso8601 as keys. |
| string
|
get_iso_8601(nYear,
nMonth,
nDay,
nHour,
nMinute,
nSecond)
Convert numbers of date in the iso 8601 format. |
| float
|
get_max_solar_flux(ctime,
fLat)
Get the maximum solar flux value for this day. |
| float
|
get_one_value(sValue,
fLat,
fLon,
tuple_or_ctime,
fUTC,
sSummerTime)
Compute the value indicated by sValue and return it. |
| tuple
|
get_one_year_data(fLat,
fLon,
ctime,
fUTC,
sTimezone)
Generate the information (sunset, sunrise, altitude) for one year. |
| list
|
get_one_year_max_sf(nYear,
fLat)
Get the solar flux for a whole year. |
| list
|
get_one_year_of_iso8601(ctime)
Return a list containing all the dates to the year corresponding to
the ctime in in iso8601 format. |
| list
|
get_solar_flux_as_csv(lDateISO8601,
fLat1,
lFlux1,
fLat2,
lFlux2)
Returns a list containing the date, maximal solar flux for each
day. |
| list
|
get_sun_altitude_as_csv(lDateISO8601,
fLat1,
lAltitude1,
fLat2,
lAltitude2)
Returns a list containing the date, sun altitude like the CSV
file. |
| list
|
get_sunrise_sunset_as_csv(lDateISO8601,
lSunrise1,
lSunset1,
lDaylength1,
fLat1,
fLon1,
fUTC1,
sSummerTime1,
lSunrise2,
lSunset2,
lDaylength2,
fLat2,
fLon2,
fUTC2,
sSummerTime2)
Returns a list containing the date, sunrise, sunset, daylength, like
the CSV file. |
| float
|
get_twilight_length(nYear,
nMonth,
nDay,
fLat)
Get the twilight length in minute for this day and latitude. |
| list
|
get_twilight_length_as_csv(lDateISO8601,
fLat1,
lLength1,
fLat2,
lLength2)
Returns a list containing the date, twilight length in minute for each
day. |
| float
|
get_twilight_length_day(ctime,
fLat)
Get the twilight length in minute for this day and latitude. |
| list
|
get_twilight_length_year(ctime,
fLat)
Get the twilight length in minute for the year of this day and
latitude. |
| tuple
|
get_yesterday(nYear,
nMonth,
nDay)
Given a tuple containing (nYear, nMonth, nDay), remove one day and
returns the tuple. |
| bool
|
is_summer_time(nJulianDay,
nYear,
sSummerTime)
Is this julian day during summer time? |
| string
|
remove_extension(sFilename)
Remove the extension of a string file. |
| |
save_info_flat_file(sFilename,
lDateISO8601,
lSunrise1,
lSunset1,
lDaylength1,
fLat1,
fLon1,
fUTC1,
sSummerTime1,
lSunrise2,
lSunset2,
lDaylength2,
fLat2,
fLon2,
fUTC2,
sSummerTime2)
Simply call get_sunrise_sunset_as_csv and save it into
a text file. |
| string
|
str_to_at_least_two_digits(nNumber)
Take an int and return '01' instead of '1'. |
| tuple
|
tranform_decimal_hour_in_minutes(fTimeHour,
sRound)
Description: Return an array containing the hour, the minutes and the
secondes, respectively. |