Package pylal :: Module followup_missed :: Class FollowupMissed
[hide private]
[frames] | no frames]

Class FollowupMissed

source code

This defines a class for followup missed injections or follow up any injections in general. This class essentially creates time-series of triggers around the time of a missed injection for the various steps of the pipeline.

Usage:

# first need to initialize the class followup = followup_missed.FollowupMissed( cache, opts)

# later, one can do a followup of a missed injection 'inj', which returns the filename # of the html file containing the tables and pictures created followuphtml = followup.followup( inj, ifo )

Instance Methods [hide private]
 
__init__(self, cache, opts)
Initialize this class and sets up all the cache files.
source code
 
get_injection_id(self, filename=None, url=None, cache_entry=None)
Extracting the injection ID from the filename, using the mechanism as used in lalapps_path2cache.
source code
 
readVetoFiles(self)
Reads the veto segments given by veto-files (if any)
source code
 
reset(self)
Resets the counting number for the time-series plots generated.
source code
 
setTag(self, tag)
Just sets the tag, called from plotinspmissed (why needed?)
source code
 
print_inj(self, inj, injID)
Print some useful informations to the screen.
source code
 
savePlot(self, stage)
Saves the plots and store them in a seperate fnameList.
source code
 
findInjection(self, missedInj)
Find the injection-ID corresponding to this particular missed injection.
source code
 
getTimeTrigger(self, trig)
This is a helper function to return a GPS time as one float number
source code
 
getTimeSim(self, sim, ifo=None)
This is a helper function to return a GPS time as one float number for a certain IFO.
source code
 
highlightVeto(self, timeInjection, segLarge, ifoName, ylims)
Finds the intersection of the drawn triggers with the veto segments for this IFO
source code
 
isThereVeto(self, timeTrigger, ifoName)
This function checks if at the time 'timeTrigger' the IFO 'ifoName' is vetoed.
source code
 
getExpectedSNR(self, triggerFiles, inj, number)
Investigate template bank and returns exepcted horizon distance
source code
 
putText(self, text)
Puts some text into an otherwise empty plot.
source code
 
investigateTimeseries(self, triggerFiles, inj, ifoName, stage, number)
Investigate inspiral triggers and create a time-series of the SNRs around the injected time
source code
 
select_category(self, trigger_files, category)
Return a trigger list that contains only files for the choosen category.
source code
 
followup(self, inj, selectIFO, description=None)
Do the followup procedure for the missed injection 'inj' and create the several time-series for INSPIRAL and THINCA.
source code
 
estimatedDistance(self, mass1, mass2, distTarget)
Calculates the approx.
source code
Method Details [hide private]

__init__(self, cache, opts)
(Constructor)

source code 

Initialize this class and sets up all the cache files.

Parameters:
  • cache - The cache of all files
  • opts - The 'opts' structure from the main code

get_injection_id(self, filename=None, url=None, cache_entry=None)

source code 

Extracting the injection ID from the filename, using
the mechanism as used in lalapps_path2cache. You can specify the filename
itself, the url or the cache entry. You must not specify more than one input!
The injection-ID is calculated in the following way (exttrig only):

The code expects the INSPIRAL and THINCA files in the following scheme (example):
  PREFIX-TAGPART_injections32_77-GPS-DURATION.xml
The number of the injection run is extracted (INJRUN) as well as the following
number (INJNUMBER). The injection ID is then calculated as:
   INJID = 100000*INJRUN + INJNUMBER
so for this example the injectionj ID is 3200077. 

@param file: filename from which the injection ID is extracted
@param url:  url from which the injection ID is extracted
@param cache_entry: cache entry from which the injection ID is extracted

setTag(self, tag)

source code 

Just sets the tag, called from plotinspmissed (why needed?)

Parameters:
  • tag - tag for this followup

print_inj(self, inj, injID)

source code 

Print some useful informations to the screen.

Parameters:
  • inj - the current missed injection
  • injID - the injection ID (used for exttrig only)

savePlot(self, stage)

source code 

Saves the plots and store them in a seperate fnameList.

Parameters:
  • stage - the stage this plot belongs to (e.g. INSPIRAL, THINCA,...)

findInjection(self, missedInj)

source code 

Find the injection-ID corresponding to this particular missed injection.

Parameters:
  • missedInj - the missed injection

getTimeTrigger(self, trig)

source code 

This is a helper function to return a GPS time as one float number

Parameters:
  • trig - a sngl_inspiral table entry

getTimeSim(self, sim, ifo=None)

source code 

This is a helper function to return a GPS time as one float number for a certain IFO. If no IFO is specified the injected geocentric time is returned.

Parameters:
  • sim - a sim_inspiral table entry
  • ifo - the IFO for which we want the sim time

isThereVeto(self, timeTrigger, ifoName)

source code 

This function checks if at the time 'timeTrigger' the IFO 'ifoName' is vetoed.

Parameters:
  • timeTrigger - The time to be investigated
  • ifoName - The name of the IFO to be investigated

getExpectedSNR(self, triggerFiles, inj, number)

source code 

Investigate template bank and returns exepcted horizon distance

Parameters:
  • triggerFiles - List of files containing the inspiral triggers
  • inj - The current injection
  • ifo - The current IFO
  • number - The consecutive number for this inspiral followup

putText(self, text)

source code 

Puts some text into an otherwise empty plot.

Parameters:
  • text - text to put in the empty plot

investigateTimeseries(self, triggerFiles, inj, ifoName, stage, number)

source code 

Investigate inspiral triggers and create a time-series of the SNRs around the injected time

Parameters:
  • triggerFiles - List of files containing the inspiral triggers
  • inj - the current missed injection
  • ifoName - the IFO for which the plot is made
  • stage - the name of the stage (FIRST, SECOND)
  • number - the consecutive number for this inspiral followup

select_category(self, trigger_files, category)

source code 

Return a trigger list that contains only files for the choosen category.

Parameters:
  • triggerList - a list of file names
  • category - a category number
Returns:
a sub list of filename corresponding to the category requested

followup(self, inj, selectIFO, description=None)

source code 

Do the followup procedure for the missed injection 'inj' and create the several time-series for INSPIRAL and THINCA. The return value is the name of the created html file.

Parameters:
  • inj - sim_inspiral table of the injection that needs to be followed up
  • selectIFO - the IFO that is investigated
  • description - Can be used to sieve further this pattern from the description field.

estimatedDistance(self, mass1, mass2, distTarget)

source code 

Calculates the approx. effective distance (in Mpc) for a
binary of two objects with masses 'mass1' and 'mass2',
when the efective distance for a 10/10 binary is 'distTarget'.
This distance is rescaled given the two masses and the spectrum.
Example

  estimatedDistance(10.0, 10.0, 100.0)
  should return exactly 100.0 again.
  
@param mass1: The mass of the first component (Solar masses)
@param mass2: The mass of the second component (Solar masses)
@param distTarget: Effective distance for a 10/10 binary