Ejemplo n.º 1
0
    # Close figure
    NSBPlot.close_figure()

    if send_emails == True:
        import pysqm.email
        night_label = str(datetime.date.today()-timedelta(days=1))
        pysqm.email.send_emails(night_label=night_label,Stat=NSBData.Statistics)

'''
The following code allows to execute plot.py as a standalone program.
'''
if __name__ == '__main__':
    # Exec the main program
    import pysqm.settings as settings
    InputArguments = settings.ArgParser(inputfile=True)
    configfilename = InputArguments.config
    try:
        settings.GlobalConfig.read_config_file(configfilename)
        config = settings.GlobalConfig.config
        make_plot(input_filename=InputArguments.input,\
          send_emails=False,write_stats=False)
    except:
        raise
        print("Error: The arguments you provided are invalid")
        InputArguments.print_help()




Ejemplo n.º 2
0
You should have received a copy of the GNU General Public License
along with PySQM.  If not, see <http://www.gnu.org/licenses/>.
____________________________
'''

import os, sys
import time
import datetime
import argparse
'''
Read input arguments (if any)
'''
import pysqm.settings as settings

InputArguments = settings.ArgParser()
configfilename = InputArguments.config

# Load config contents into GlobalConfig
settings.GlobalConfig.read_config_file(configfilename)

# Get the actual config
config = settings.GlobalConfig.config

### Load now the rest of the modules
from pysqm.read import *
import pysqm.plot
'''
This import section is only for software build purposes.
Dont worry if some of these are missing in your setup.
'''