CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Functions | Variables
create_public_lumi_plots.py File Reference

Go to the source code of this file.

Classes

class  create_public_lumi_plots.LumiDataBlock
 
class  create_public_lumi_plots.LumiDataBlockCollection
 
class  create_public_lumi_plots.LumiDataPoint
 

Namespaces

 create_public_lumi_plots
 

Functions

def create_public_lumi_plots.AtMidnight
 
def create_public_lumi_plots.AtMidWeek
 
def create_public_lumi_plots.CacheFilePath
 
def create_public_lumi_plots.checkCertification
 
def create_public_lumi_plots.GetEnergyPerNucleonScaleFactor
 
def create_public_lumi_plots.GetUnits
 
def create_public_lumi_plots.GetXLocator
 
def create_public_lumi_plots.loadCertificationJSON
 
def create_public_lumi_plots.NumDaysInYear
 
def create_public_lumi_plots.PlotAllYears
 
def create_public_lumi_plots.TweakPlot
 

Variables

tuple create_public_lumi_plots.accel_mode = cfg_parser.get("general", "accel_mode")
 
 create_public_lumi_plots.add_extra_head_room = is_log)
 
 create_public_lumi_plots.amodetag_bug_workaround = False
 
tuple create_public_lumi_plots.arg_parser = optparse.OptionParser(description=desc_str)
 
tuple create_public_lumi_plots.aspect_ratio = matplotlib.figure.figaspect(1. / 2.5)
 
tuple create_public_lumi_plots.ax = fig.add_subplot(111)
 
 create_public_lumi_plots.beam_energy = None
 
dictionary create_public_lumi_plots.beam_energy_defaults
 
 create_public_lumi_plots.beam_energy_from_cfg = None
 
tuple create_public_lumi_plots.beam_energy_tmp = cfg_parser.get("general", "beam_energy")
 
 create_public_lumi_plots.beam_fluctuation = None
 
dictionary create_public_lumi_plots.beam_fluctuation_defaults
 
 create_public_lumi_plots.beam_fluctuation_from_cfg = None
 
tuple create_public_lumi_plots.beam_fluctuation_tmp = cfg_parser.get("general", "beam_fluctuation")
 
tuple create_public_lumi_plots.bin_edges
 
tuple create_public_lumi_plots.cache_file_dir = cfg_parser.get("general", "cache_dir")
 
tuple create_public_lumi_plots.cache_file_path = CacheFilePath(cache_file_dir, day)
 
tuple create_public_lumi_plots.cache_file_tmp = cache_file_path.replace(".csv", "_tmp.csv")
 
 create_public_lumi_plots.certification_data = None
 
dictionary create_public_lumi_plots.cfg_defaults
 
tuple create_public_lumi_plots.cfg_parser = ConfigParser.SafeConfigParser(cfg_defaults)
 
string create_public_lumi_plots.cmd = "%s --begin '%s' --end '%s' -o %s"
 
int create_public_lumi_plots.cms_energy = 2
 
string create_public_lumi_plots.cms_energy_str = "???"
 
list create_public_lumi_plots.color = color_by_year[year]
 
 create_public_lumi_plots.color_by_year = color_scheme.color_by_year
 
 create_public_lumi_plots.color_fill_cert = color_scheme.color_fill_cert
 
 create_public_lumi_plots.color_fill_del = color_scheme.color_fill_del
 
 create_public_lumi_plots.color_fill_peak = color_scheme.color_fill_peak
 
 create_public_lumi_plots.color_fill_rec = color_scheme.color_fill_rec
 
 create_public_lumi_plots.color_line_cert = color_scheme.color_line_cert
 
 create_public_lumi_plots.color_line_del = color_scheme.color_line_del
 
 create_public_lumi_plots.color_line_peak = color_scheme.color_line_peak
 
 create_public_lumi_plots.color_line_rec = color_scheme.color_line_rec
 
tuple create_public_lumi_plots.color_scheme = ColorScheme(color_scheme_name)
 
list create_public_lumi_plots.color_scheme_names = [i.strip() for i in color_scheme_names_tmp.split(",")]
 
tuple create_public_lumi_plots.color_scheme_names_tmp = cfg_parser.get("general", "color_schemes")
 
list create_public_lumi_plots.config_file_name = args[0]
 
tuple create_public_lumi_plots.date_begin = datetime.datetime.strptime(tmp, DATE_FMT_STR_CFG)
 
tuple create_public_lumi_plots.date_begin_day_str = day.strftime(DATE_FMT_STR_LUMICALC_DAY)
 
tuple create_public_lumi_plots.date_begin_str = day.strftime(DATE_FMT_STR_LUMICALC)
 
 create_public_lumi_plots.date_end = None
 
tuple create_public_lumi_plots.date_end_str = (day + datetime.timedelta(days=1))
 
string create_public_lumi_plots.DATE_FMT_STR_AXES = "%-d %b"
 
string create_public_lumi_plots.DATE_FMT_STR_CFG = "%Y-%m-%d"
 
string create_public_lumi_plots.DATE_FMT_STR_LUMICALC = "%m/%d/%y %H:%M:%S"
 
string create_public_lumi_plots.DATE_FMT_STR_LUMICALC_DAY = "%m/%d/%y"
 
string create_public_lumi_plots.DATE_FMT_STR_OUT = "%Y-%m-%d %H:%M"
 
tuple create_public_lumi_plots.date_previous_str = (day - datetime.timedelta(days=1))
 
 create_public_lumi_plots.day_cur = date_begin
 
tuple create_public_lumi_plots.day_hi = AtMidnight(lumi_data.time_end())
 
tuple create_public_lumi_plots.day_lo = AtMidnight(lumi_data.time_begin())
 
list create_public_lumi_plots.days = [date_begin + datetime.timedelta(days=i) for i in xrange(num_days)]
 
string create_public_lumi_plots.desc_str = "This script creates the official CMS luminosity plots "
 
tuple create_public_lumi_plots.dummy_file = open(cache_file_tmp, "w")
 
tuple create_public_lumi_plots.exp = math.floor(math.log10(min_val))
 
 create_public_lumi_plots.facecolor = color_line_peak,
 
tuple create_public_lumi_plots.fig = plt.figure()
 
 create_public_lumi_plots.file_suffix = color_scheme.file_suffix
 
 create_public_lumi_plots.fontproperties = FONT_PROPS_SUPTITLE)
 
int create_public_lumi_plots.head_room = 2
 
string create_public_lumi_plots.help = "Ignore all cached lumiCalc results "
 
string create_public_lumi_plots.helper_str = ""
 
string create_public_lumi_plots.histtype = "stepfilled"
 
 create_public_lumi_plots.ignore_cache = options.ignore_cache
 
tuple create_public_lumi_plots.in_file = open(cache_file_path)
 
tuple create_public_lumi_plots.is_log = (type == "log")
 
tuple create_public_lumi_plots.json_file_name = cfg_parser.get("general", "json_file")
 
list create_public_lumi_plots.KNOWN_ACCEL_MODES
 
string create_public_lumi_plots.label = "Max. inst. lumi.: %.2f %s"
 
tuple create_public_lumi_plots.last_day_from_cache = min(today - datetime.timedelta(days=2), date_end)
 
int create_public_lumi_plots.LEAD_SCALE_FACTOR = 82
 
tuple create_public_lumi_plots.leg
 
tuple create_public_lumi_plots.lines = in_file.readlines()
 
tuple create_public_lumi_plots.lines_ori = open(cache_file_tmp)
 
list create_public_lumi_plots.lines_to_be_kept = []
 
string create_public_lumi_plots.linestyle = "none"
 
 create_public_lumi_plots.log = log_setting,
 
 create_public_lumi_plots.log_setting = False
 
string create_public_lumi_plots.log_suffix = ""
 
 create_public_lumi_plots.logo_name = color_scheme.logo_name
 
list create_public_lumi_plots.lumi_data = lumi_data_by_day_per_year[year]
 
dictionary create_public_lumi_plots.lumi_data_by_day = {}
 
dictionary create_public_lumi_plots.lumi_data_by_day_per_year = {}
 
dictionary create_public_lumi_plots.lumi_data_by_week = {}
 
dictionary create_public_lumi_plots.lumi_data_by_week_per_year = {}
 
dictionary create_public_lumi_plots.lumi_data_by_year = {}
 
tuple create_public_lumi_plots.lumi_data_day = LumiDataBlock()
 
string create_public_lumi_plots.lumicalc_cmd = "%s %s"
 
string create_public_lumi_plots.lumicalc_flags = "%s --without-checkforupdate "
 
tuple create_public_lumi_plots.lumicalc_flags_from_cfg = cfg_parser.get("general", "lumicalc_flags")
 
tuple create_public_lumi_plots.lumicalc_script = cfg_parser.get("general", "lumicalc_script")
 
string create_public_lumi_plots.marker = "."
 
tuple create_public_lumi_plots.max_del = max(weights_del)
 
tuple create_public_lumi_plots.max_inst = max(weights_del_inst)
 
tuple create_public_lumi_plots.max_rec = max(weights_rec)
 
tuple create_public_lumi_plots.min_del = min(weights_del_for_cum)
 
tuple create_public_lumi_plots.min_val = min(weights_del_inst)
 
tuple create_public_lumi_plots.newfile = open(cache_file_path, "w")
 
 create_public_lumi_plots.num_cols = None
 
tuple create_public_lumi_plots.num_days = (date_end - date_begin)
 
int create_public_lumi_plots.NUM_SEC_IN_LS = 2
 
tuple create_public_lumi_plots.num_weeks = week_hi.isocalendar()
 
tuple create_public_lumi_plots.oracle_connection_string = cfg_parser.get("general", "oracle_connection")
 
tuple create_public_lumi_plots.output_0 = copy.deepcopy(output)
 
list create_public_lumi_plots.particle_type_str = particle_type_strings[accel_mode]
 
dictionary create_public_lumi_plots.particle_type_strings
 
tuple create_public_lumi_plots.path_name = CacheFilePath(cache_file_dir)
 
int create_public_lumi_plots.scale_factor_2010 = 10
 
int create_public_lumi_plots.sep_line = 50
 
 create_public_lumi_plots.str_begin = None
 
tuple create_public_lumi_plots.str_begin_ultimate = time_begin_ultimate.strftime(DATE_FMT_STR_OUT)
 
 create_public_lumi_plots.str_end = None
 
tuple create_public_lumi_plots.time_begin
 
list create_public_lumi_plots.time_begin_ultimate = lumi_data_by_day_per_year[years[0]]
 
tuple create_public_lumi_plots.time_end
 
list create_public_lumi_plots.times = [matplotlib.dates.date2num(i) for i in times_tmp]
 
list create_public_lumi_plots.times_tmp = [AtMidnight(i) for i in lumi_data.times()]
 
tuple create_public_lumi_plots.tmp = cfg_parser.get("general", "date_begin")
 
tuple create_public_lumi_plots.tmp_leg
 
string create_public_lumi_plots.tmp_str = " - (no data, presumably no lumi either)"
 
int create_public_lumi_plots.tmp_x = .09
 
int create_public_lumi_plots.tmp_y = .97
 
tuple create_public_lumi_plots.today = datetime.datetime.utcnow()
 
tuple create_public_lumi_plots.tot_cert = sum(weights_cert_for_cum)
 
tuple create_public_lumi_plots.tot_del = sum(weights_del_for_cum)
 
tuple create_public_lumi_plots.tot_rec = sum(weights_rec_for_cum)
 
int create_public_lumi_plots.transform = 15
 
tuple create_public_lumi_plots.units = GetUnits(years[-1], accel_mode, "cum_day")
 
tuple create_public_lumi_plots.use_cache = (not ignore_cache)
 
tuple create_public_lumi_plots.use_oracle = (len(oracle_connection_string) != 0)
 
tuple create_public_lumi_plots.verbose = cfg_parser.getboolean("general", "verbose")
 
string create_public_lumi_plots.verticalalignment = "center"
 
tuple create_public_lumi_plots.week = day_cur.isocalendar()
 
tuple create_public_lumi_plots.week_begin = date_begin.isocalendar()
 
tuple create_public_lumi_plots.week_end = date_end.isocalendar()
 
tuple create_public_lumi_plots.week_hi = AtMidWeek(lumi_data.time_end())
 
tuple create_public_lumi_plots.week_lo = AtMidWeek(lumi_data.time_begin())
 
list create_public_lumi_plots.weeks = []
 
tuple create_public_lumi_plots.weights_cert_for_cum = lumi_data.lum_cert(units)
 
tuple create_public_lumi_plots.weights_del = lumi_data.lum_del(units)
 
tuple create_public_lumi_plots.weights_del_for_cum = lumi_data.lum_del(units)
 
tuple create_public_lumi_plots.weights_del_inst = lumi_data.lum_inst_max(units)
 
tuple create_public_lumi_plots.weights_inst = lumi_data.lum_inst_max(units)
 
tuple create_public_lumi_plots.weights_rec = lumi_data.lum_rec(units)
 
tuple create_public_lumi_plots.weights_rec_for_cum = lumi_data.lum_rec(units)
 
 create_public_lumi_plots.weights_tmp = None
 
int create_public_lumi_plots.width = 0
 
tuple create_public_lumi_plots.xy = (times[-1], max(weights_tmp))
 
string create_public_lumi_plots.xycoords = "data"
 
tuple create_public_lumi_plots.xytext = (5., -2.)
 
tuple create_public_lumi_plots.year = day_cur.isocalendar()
 
tuple create_public_lumi_plots.year_begin = date_begin.isocalendar()
 
tuple create_public_lumi_plots.year_end = date_end.isocalendar()
 
tuple create_public_lumi_plots.years = range(year_begin, year_end + 1)
 
int create_public_lumi_plots.zoom = .97