|
ctools 2.1.0
|
Public Member Functions | |
| __init__ (self, *argv) | |
| __getstate__ (self) | |
| __setstate__ (self, state) | |
| process (self) | |
| save (self) | |
Protected Member Functions | |
| _get_parameters (self) | |
| _load_statistics (self) | |
| _format_time (self, seconds) | |
| _format_footprint (self, gCO2e, latex=False) | |
| _get_global_information (self, statistics, latex=False) | |
| _global_statistics (self, statistics) | |
| _daily_statistics (self, statistics) | |
| _tools_statistics (self, statistics) | |
| _create_figure (self, outfile, statistics) | |
| _plot_daily (self, ax, statistics, quantity='gCO2e', title='Footprint', ylabel=r 'g CO$_2$e', yscale=1.0) | |
| _plot_pie (self, ax, statistics, quantity='gCO2e', title='Footprint', num=5, args=None) | |
Protected Attributes | |
| _statistics | |
Carbon footprint report script
Definition at line 32 of file csfootprint.py.
| cscripts.csfootprint.csfootprint.__init__ | ( | self, | |
| * | argv ) |
Constructor
Parameters
----------
argv : list of str
List of IRAF command line parameter strings of the form
``parameter=3``.
Definition at line 38 of file csfootprint.py.
| cscripts.csfootprint.csfootprint.__getstate__ | ( | self | ) |
Extend ctools.cscript __getstate__ method
Returns
-------
state : dict
Pickled instance
Definition at line 58 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._statistics.
| cscripts.csfootprint.csfootprint.__setstate__ | ( | self, | |
| state ) |
Extend ctools.cscript __setstate__ method
Parameters
----------
state : dict
Pickled instance
Definition at line 74 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._statistics.
|
protected |
Create figure
Parameters
----------
outfile : str
Figure file name
statistics : dict
Statistics dictionary
Definition at line 571 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._get_global_information(), cscripts.csfootprint.csfootprint._plot_daily(), and cscripts.csfootprint.csfootprint._plot_pie().
Referenced by cscripts.csfootprint.csfootprint.save().
|
protected |
Log daily statistics
Parameters
----------
statistics : dict
Statistics dictionary
Definition at line 431 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._format_footprint(), and cscripts.csfootprint.csfootprint._format_time().
Referenced by cscripts.csfootprint.csfootprint.process().
|
protected |
Format carbon footprint
Parameters
----------
gCO2e : float
Carbon footprint in gCO2e
latex : bool, optional
Use LaTeX formatting
Definition at line 287 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint._daily_statistics(), cscripts.csfootprint.csfootprint._get_global_information(), and cscripts.csfootprint.csfootprint._tools_statistics().
|
protected |
Format time
Parameters
----------
seconds : float
Time in seconds
Definition at line 266 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint._daily_statistics(), cscripts.csfootprint.csfootprint._get_global_information(), and cscripts.csfootprint.csfootprint._tools_statistics().
|
protected |
Get global information from statistics
Parameters
----------
statistics : dict
Statistics dictionary
latex : bool, optional
Use LaTeX formatting
Definition at line 316 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._format_footprint(), and cscripts.csfootprint.csfootprint._format_time().
Referenced by cscripts.csfootprint.csfootprint._create_figure(), and cscripts.csfootprint.csfootprint._global_statistics().
|
protected |
Get parameters from parfile
Definition at line 92 of file csfootprint.py.
Referenced by cscripts.csadd2caldb.csadd2caldb.process(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.cscaldb.cscaldb.process(), cscripts.csebins.csebins.process(), cscripts.csfindobs.csfindobs.process(), cscripts.csfootprint.csfootprint.process(), cscripts.csiactcopy.csiactcopy.process(), cscripts.csiactdata.csiactdata.process(), cscripts.csiactobs.csiactobs.process(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.csmodelsois.csmodelsois.process(), cscripts.csobs2caldb.csobs2caldb.process(), cscripts.csobsdef.csobsdef.process(), cscripts.csobsinfo.csobsinfo.process(), cscripts.csobsselect.csobsselect.process(), cscripts.csphagen.csphagen.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.cspull.cspull.process(), cscripts.csresmap.csresmap.process(), cscripts.csresspec.csresspec.process(), cscripts.csroot2caldb.csroot2caldb.process(), cscripts.csscs.csscs.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.cstsdist.cstsdist.process(), cscripts.cstsmapmerge.cstsmapmerge.process(), cscripts.cstsmapsplit.cstsmapsplit.process(), cscripts.csviscube.csviscube.process(), and cscripts.csworkflow.csworkflow.process().
|
protected |
Log global statistics
Parameters
----------
statistics : dict
Statistics dictionary
Definition at line 395 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._get_global_information().
Referenced by cscripts.csfootprint.csfootprint.process().
|
protected |
Load statistics
Definition at line 115 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint.process().
|
protected |
Plot daily figure
Parameters
----------
ax : pyplot
Plotting frame
statistics : dict
Statistics dictionary
quantity : str, optional
Quantity to plot
title : str, optional
Plot title
ylabel : str, optional
Y axis label
yscale : float, optional
Y axis scale
Definition at line 690 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint._create_figure().
|
protected |
Plot pie figure
Parameters
----------
ax : pyplot
Plotting frame
statistics : dict
Statistics dictionary
quantity : str, optional
Quantity to plot
title : str, optional
Plot title
num : integer, optional
Number of pies displayed explicitly
arg : list or str, optional
List of pie method keyword arguments
Definition at line 730 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint._create_figure().
|
protected |
Log tools statistics
Parameters
----------
statistics : dict
Statistics dictionary
Definition at line 475 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._format_footprint(), and cscripts.csfootprint.csfootprint._format_time().
Referenced by cscripts.csfootprint.csfootprint.process().
| cscripts.csfootprint.csfootprint.process | ( | self | ) |
Process the script
Definition at line 791 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._daily_statistics(), cscripts.csadd2caldb.csadd2caldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.cscaldb.cscaldb._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csfindobs.csfindobs._get_parameters(), cscripts.csfootprint.csfootprint._get_parameters(), cscripts.csiactcopy.csiactcopy._get_parameters(), cscripts.csiactdata.csiactdata._get_parameters(), cscripts.csiactobs.csiactobs._get_parameters(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csmodelmerge.csmodelmerge._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csmodelsois.csmodelsois._get_parameters(), cscripts.csobs2caldb.csobs2caldb._get_parameters(), cscripts.csobsdef.csobsdef._get_parameters(), cscripts.csobsinfo.csobsinfo._get_parameters(), cscripts.csobsselect.csobsselect._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.csresmap.csresmap._get_parameters(), cscripts.csresspec.csresspec._get_parameters(), cscripts.csroot2caldb.csroot2caldb._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cssrcdetect.cssrcdetect._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cstsmapmerge.cstsmapmerge._get_parameters(), cscripts.cstsmapsplit.cstsmapsplit._get_parameters(), cscripts.csviscube.csviscube._get_parameters(), cscripts.csworkflow.csworkflow._get_parameters(), cscripts.csfootprint.csfootprint._global_statistics(), cscripts.csfootprint.csfootprint._load_statistics(), cscripts.csfootprint.csfootprint._statistics, and cscripts.csfootprint.csfootprint._tools_statistics().
| cscripts.csfootprint.csfootprint.save | ( | self | ) |
Save something
Definition at line 812 of file csfootprint.py.
References cscripts.csfootprint.csfootprint._create_figure(), and cscripts.csfootprint.csfootprint._statistics.
|
protected |
Definition at line 52 of file csfootprint.py.
Referenced by cscripts.csfootprint.csfootprint.__getstate__(), cscripts.csfootprint.csfootprint.__setstate__(), cscripts.csfootprint.csfootprint.process(), and cscripts.csfootprint.csfootprint.save().