_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
31
13.1k
language
stringclasses
1 value
meta_information
dict
q32100
phi_from_spinx_spiny
train
def phi_from_spinx_spiny(spinx, spiny): """Returns the angle between the x-component axis
python
{ "resource": "" }
q32101
spin1z_from_mass1_mass2_chi_eff_chi_a
train
def spin1z_from_mass1_mass2_chi_eff_chi_a(mass1, mass2, chi_eff, chi_a):
python
{ "resource": "" }
q32102
spin2z_from_mass1_mass2_chi_eff_chi_a
train
def spin2z_from_mass1_mass2_chi_eff_chi_a(mass1, mass2, chi_eff, chi_a):
python
{ "resource": "" }
q32103
spin1x_from_xi1_phi_a_phi_s
train
def spin1x_from_xi1_phi_a_phi_s(xi1, phi_a, phi_s): """Returns x-component spin
python
{ "resource": "" }
q32104
spin1y_from_xi1_phi_a_phi_s
train
def spin1y_from_xi1_phi_a_phi_s(xi1, phi_a, phi_s): """Returns y-component spin
python
{ "resource": "" }
q32105
spin2x_from_mass1_mass2_xi2_phi_a_phi_s
train
def spin2x_from_mass1_mass2_xi2_phi_a_phi_s(mass1, mass2, xi2, phi_a, phi_s): """Returns x-component spin for secondary mass. """
python
{ "resource": "" }
q32106
spin2y_from_mass1_mass2_xi2_phi_a_phi_s
train
def spin2y_from_mass1_mass2_xi2_phi_a_phi_s(mass1, mass2, xi2, phi_a, phi_s): """Returns y-component spin for secondary mass. """
python
{ "resource": "" }
q32107
dquadmon_from_lambda
train
def dquadmon_from_lambda(lambdav): r"""Return the quadrupole moment of a neutron star given its lambda We use the relations defined here. https://arxiv.org/pdf/1302.4499.pdf. Note that the convention we use is that: .. math:: \mathrm{dquadmon} = \bar{Q} - 1. Where :math:`\bar{Q}` (dimens...
python
{ "resource": "" }
q32108
_det_tc
train
def _det_tc(detector_name, ra, dec, tc, ref_frame='geocentric'): """Returns the coalescence time of a signal in the given detector. Parameters ---------- detector_name : string The name of the detector, e.g., 'H1'. ra : float The right ascension of the signal, in radians. dec : ...
python
{ "resource": "" }
q32109
_optimal_orientation_from_detector
train
def _optimal_orientation_from_detector(detector_name, tc): """ Low-level function to be called from _optimal_dec_from_detector and _optimal_ra_from_detector"""
python
{ "resource": "" }
q32110
_genqnmfreq
train
def _genqnmfreq(mass, spin, l, m, nmodes, qnmfreq=None): """Convenience function to generate QNM frequencies from lalsimulation. Parameters ---------- mass : float The mass of the black hole (in solar masses). spin : float The dimensionless spin of the black hole. l : int ...
python
{ "resource": "" }
q32111
get_lm_f0tau
train
def get_lm_f0tau(mass, spin, l, m, nmodes): """Return the f0 and the tau of each overtone for a given l, m mode. Parameters ---------- mass : float or array Mass of the black hole (in solar masses). spin : float or array Dimensionless spin of the final black hole. l : int or arr...
python
{ "resource": "" }
q32112
get_lm_f0tau_allmodes
train
def get_lm_f0tau_allmodes(mass, spin, modes): """Returns a dictionary of all of the frequencies and damping times for the requested modes. Parameters ---------- mass : float or array Mass of the black hole (in solar masses). spin : float or array Dimensionless spin of the final ...
python
{ "resource": "" }
q32113
freq_from_final_mass_spin
train
def freq_from_final_mass_spin(final_mass, final_spin, l=2, m=2, nmodes=1): """Returns QNM frequency for the given mass and spin and mode. Parameters ---------- final_mass : float or array Mass of the black hole (in solar masses). final_spin : float or array Dimensionless spin of the...
python
{ "resource": "" }
q32114
tau_from_final_mass_spin
train
def tau_from_final_mass_spin(final_mass, final_spin, l=2, m=2, nmodes=1): """Returns QNM damping time for the given mass and spin and mode. Parameters ---------- final_mass : float or array Mass of the black hole (in solar masses). final_spin : float or array Dimensionless spin of t...
python
{ "resource": "" }
q32115
final_spin_from_f0_tau
train
def final_spin_from_f0_tau(f0, tau, l=2, m=2): """Returns the final spin based on the given frequency and damping time. .. note:: Currently, only l = m = 2 is supported. Any other indices will raise a ``KeyError``. Parameters ---------- f0 : float or array Frequency of the ...
python
{ "resource": "" }
q32116
get_final_from_initial
train
def get_final_from_initial(mass1, mass2, spin1x=0., spin1y=0., spin1z=0., spin2x=0., spin2y=0., spin2z=0., approximant='SEOBNRv4'): """Estimates the final mass and spin from the given initial parameters. This uses the fits used by the EOBNR models for conve...
python
{ "resource": "" }
q32117
final_mass_from_initial
train
def final_mass_from_initial(mass1, mass2, spin1x=0., spin1y=0., spin1z=0., spin2x=0., spin2y=0., spin2z=0., approximant='SEOBNRv4'): """Estimates the final mass from the given initial parameters. This uses the fits used by the EOBNR models for converting ...
python
{ "resource": "" }
q32118
nltides_gw_phase_diff_isco
train
def nltides_gw_phase_diff_isco(f_low, f0, amplitude, n, m1, m2): """Calculate the gravitational-wave phase shift bwtween f_low and f_isco due to non-linear tides. Parameters ---------- f_low: float Frequency from which to compute phase. If the other arguments are passed as numpy arr...
python
{ "resource": "" }
q32119
EmceeEnsembleSampler.model_stats
train
def model_stats(self): """A dict mapping the model's ``default_stats`` to arrays of values. The returned array has shape ``nwalkers x niterations``. """
python
{ "resource": "" }
q32120
EmceeEnsembleSampler.set_state_from_file
train
def set_state_from_file(self, filename): """Sets the state of the sampler back to the instance saved in a file. """ with self.io(filename, 'r') as fp: rstate = fp.read_random_state() # set the numpy random state
python
{ "resource": "" }
q32121
EmceeEnsembleSampler.write_results
train
def write_results(self, filename): """Writes samples, model stats, acceptance fraction, and random state to the given file. Parameters ----------- filename : str The file to write to. The file is opened using the ``io`` class in an an append state. ...
python
{ "resource": "" }
q32122
default_empty
train
def default_empty(shape, dtype): """Numpy's empty array can have random values in it. To prevent that, we define here a default emtpy array. This default empty is a numpy.zeros array, except that objects are set to None,
python
{ "resource": "" }
q32123
lstring_as_obj
train
def lstring_as_obj(true_or_false=None): """Toggles whether lstrings should be treated as strings or as objects. When FieldArrays is first loaded, the default is True. Parameters ---------- true_or_false : {None|bool} Pass True to map lstrings to objects; False otherwise. If None pro...
python
{ "resource": "" }
q32124
get_needed_fieldnames
train
def get_needed_fieldnames(arr, names): """Given a FieldArray-like array and a list of names, determines what fields are needed from the array so that using the names does not result in an error. Parameters ---------- arr : instance of a FieldArray or similar The array from which to dete...
python
{ "resource": "" }
q32125
combine_fields
train
def combine_fields(dtypes): """Combines the fields in the list of given dtypes into a single dtype. Parameters ---------- dtypes : (list of) numpy.dtype(s) Either a numpy.dtype, or a list of numpy.dtypes. Returns ------- numpy.dtype A new dtype combining the fields in the l...
python
{ "resource": "" }
q32126
_ensure_array_list
train
def _ensure_array_list(arrays): """Ensures that every element in a list is an instance of a numpy array.""" # Note: the isinstance test is needed below so that instances of FieldArray # are not converted to
python
{ "resource": "" }
q32127
merge_arrays
train
def merge_arrays(merge_list, names=None, flatten=True, outtype=None): """Merges the given arrays into a single array. The arrays must all have the same shape. If one or more of the given arrays has multiple fields, all of the fields will be included as separate fields in the new array. Parameters -...
python
{ "resource": "" }
q32128
_isstring
train
def _isstring(dtype): """Given a numpy dtype, determines whether it is a string. Returns True if the dtype is string or unicode. """
python
{ "resource": "" }
q32129
fields_from_names
train
def fields_from_names(fields, names=None): """Given a dictionary of fields and a list of names, will return a dictionary consisting of the fields specified by names. Names can be either the names of fields, or their aliases. """ if names is None: return fields if isinstance(names, strin...
python
{ "resource": "" }
q32130
FieldArray.sort
train
def sort(self, axis=-1, kind='quicksort', order=None): """Sort an array, in-place. This function extends the standard numpy record array in-place sort to allow the basic use of Field array virtual fields. Only a single field is currently supported when referencing a virtual field. ...
python
{ "resource": "" }
q32131
FieldArray.addattr
train
def addattr(self, attrname, value=None, persistent=True): """Adds an attribute to self. If persistent is True, the attribute will be made a persistent attribute. Persistent attributes are copied whenever a view or copy of this array is created. Otherwise, new views or copies of this will...
python
{ "resource": "" }
q32132
FieldArray.add_properties
train
def add_properties(self, names, methods): """Returns a view of self with the given methods added as properties. From: <http://stackoverflow.com/a/2954373/1366472>. """ cls = type(self) cls = type(cls.__name__, (cls,), dict(cls.__dict__)) if isinstance(names, string_types...
python
{ "resource": "" }
q32133
FieldArray.add_virtualfields
train
def add_virtualfields(self, names, methods): """Returns a view of this array with the given methods added as virtual fields. Specifically, the given methods are added using add_properties and their names are added to the list of virtual fields. Virtual fields are properties that are assu...
python
{ "resource": "" }
q32134
FieldArray.add_functions
train
def add_functions(self, names, functions): """Adds the given functions to the function library. Functions are added to this instance of the array; all copies of and slices of this array will also have the new functions included. Parameters ---------- names : (list of) s...
python
{ "resource": "" }
q32135
FieldArray.del_functions
train
def del_functions(self, names): """Removes the specified function names from the function library. Functions are removed from this instance of the array; all copies and slices of this array will also have the functions removed. Parameters ---------- names : (list of)
python
{ "resource": "" }
q32136
FieldArray.from_ligolw_table
train
def from_ligolw_table(cls, table, columns=None, cast_to_dtypes=None): """Converts the given ligolw table into an FieldArray. The `tableName` attribute is copied to the array's `name`. Parameters ---------- table : LIGOLw table instance The table to convert. c...
python
{ "resource": "" }
q32137
FieldArray.to_array
train
def to_array(self, fields=None, axis=0): """Returns an `numpy.ndarray` of self in which the fields are included as an extra dimension. Parameters ---------- fields : {None, (list of) strings} The fields to get. All of the fields must have the same datatype. ...
python
{ "resource": "" }
q32138
FieldArray.virtualfields
train
def virtualfields(self): """Returns a tuple listing the names of virtual fields in self.
python
{ "resource": "" }
q32139
FieldArray.parse_boolargs
train
def parse_boolargs(self, args): """Returns an array populated by given values, with the indices of those values dependent on given boolen tests on self. The given `args` should be a list of tuples, with the first element the return value and the second argument a string that evaluates t...
python
{ "resource": "" }
q32140
FieldArray.append
train
def append(self, other): """Appends another array to this array. The returned array will have all of the class methods and virutal fields of this array, including any that were added using `add_method` or `add_virtualfield`. If this array and other array have one or more string ...
python
{ "resource": "" }
q32141
_FieldArrayWithDefaults.add_default_fields
train
def add_default_fields(self, names, **kwargs): """ Adds one or more empty default fields to self. Parameters ---------- names : (list of) string(s) The names of the fields to add. Must be a field in self's default fields. Other keyword args are a...
python
{ "resource": "" }
q32142
WaveformArray.chi_eff
train
def chi_eff(self): """Returns the effective spin.""" return conversions.chi_eff(self.mass1, self.mass2,
python
{ "resource": "" }
q32143
WaveformArray.spin_px
train
def spin_px(self): """Returns the x-component of the spin of the primary mass.""" return
python
{ "resource": "" }
q32144
WaveformArray.spin_py
train
def spin_py(self): """Returns the y-component of the spin of the primary mass.""" return
python
{ "resource": "" }
q32145
WaveformArray.spin_pz
train
def spin_pz(self): """Returns the z-component of the spin of the primary mass.""" return
python
{ "resource": "" }
q32146
WaveformArray.spin_sx
train
def spin_sx(self): """Returns the x-component of the spin of the secondary mass.""" return
python
{ "resource": "" }
q32147
WaveformArray.spin_sy
train
def spin_sy(self): """Returns the y-component of the spin of the secondary mass.""" return
python
{ "resource": "" }
q32148
WaveformArray.spin_sz
train
def spin_sz(self): """Returns the z-component of the spin of the secondary mass.""" return
python
{ "resource": "" }
q32149
WaveformArray.spin1_a
train
def spin1_a(self): """Returns the dimensionless spin magnitude of mass 1.""" return coordinates.cartesian_to_spherical_rho(
python
{ "resource": "" }
q32150
WaveformArray.spin1_polar
train
def spin1_polar(self): """Returns the polar spin angle of mass 1."""
python
{ "resource": "" }
q32151
WaveformArray.spin2_a
train
def spin2_a(self): """Returns the dimensionless spin magnitude of mass 2.""" return coordinates.cartesian_to_spherical_rho(
python
{ "resource": "" }
q32152
WaveformArray.spin2_polar
train
def spin2_polar(self): """Returns the polar spin angle of mass 2."""
python
{ "resource": "" }
q32153
setup_splittable_workflow
train
def setup_splittable_workflow(workflow, input_tables, out_dir=None, tags=None): ''' This function aims to be the gateway for code that is responsible for taking some input file containing some table, and splitting into multiple files containing different parts of that table. For now the only supported o...
python
{ "resource": "" }
q32154
setup_splittable_dax_generated
train
def setup_splittable_dax_generated(workflow, input_tables, out_dir, tags): ''' Function for setting up the splitting jobs as part of the workflow. Parameters ----------- workflow : pycbc.workflow.core.Workflow The Workflow instance that the jobs will be added to. input_tables : pycbc.wo...
python
{ "resource": "" }
q32155
get_summary_page_link
train
def get_summary_page_link(ifo, utc_time): """Return a string that links to the summary page and aLOG for this ifo Parameters ---------- ifo : string The detector name utc_time : sequence First three elements must be strings giving year, month, day resp. Returns ------- ...
python
{ "resource": "" }
q32156
pkg_config
train
def pkg_config(pkg_libraries): """Use pkg-config to query for the location of libraries, library directories, and header directories Arguments: pkg_libries(list): A list of packages as strings Returns: libraries(list), library_dirs(list), include_dirs(list) """ l...
python
{ "resource": "" }
q32157
pkg_config_header_strings
train
def pkg_config_header_strings(pkg_libraries): """ Returns a list of header strings that could be passed to a compiler """ _, _, header_dirs = pkg_config(pkg_libraries) header_strings = []
python
{ "resource": "" }
q32158
pkg_config_libdirs
train
def pkg_config_libdirs(packages): """ Returns a list of all library paths that pkg-config says should be included when linking against the list of packages given as 'packages'. An empty return list means that the package may be found in the standard system locations, irrespective of pkg-config. ...
python
{ "resource": "" }
q32159
get_libpath_from_dirlist
train
def get_libpath_from_dirlist(libname, dirs): """ This function tries to find the architecture-independent library given by libname in the first available directory in the list dirs. 'Architecture-independent' means omitting any prefix such as 'lib' or suffix such as 'so' or 'dylib' or version number. W...
python
{ "resource": "" }
q32160
thin_samples_for_writing
train
def thin_samples_for_writing(fp, samples, parameters, last_iteration): """Thins samples for writing to disk. The thinning interval to use is determined by the given file handler's ``thinned_by`` attribute. If that attribute is 1, just returns the samples. Parameters ---------- fp : MCMCMetadat...
python
{ "resource": "" }
q32161
MCMCMetadataIO.write_resume_point
train
def write_resume_point(self): """Keeps a list of the number of iterations that were in a file when a run was resumed from a checkpoint.""" try: resume_pts = self.attrs["resume_points"].tolist() except KeyError: resume_pts = [] try:
python
{ "resource": "" }
q32162
MCMCMetadataIO.thin
train
def thin(self, thin_interval): """Thins the samples on disk using the given thinning interval. Parameters ---------- thin_interval : int The interval to thin by. """ # read thinned samples into memory params = self[self.samples_group].keys() s...
python
{ "resource": "" }
q32163
MCMCMetadataIO.last_iteration
train
def last_iteration(self, parameter=None): """Returns the iteration of the last sample of the given parameter. If parameter is ``None``, will just use the first parameter in the samples group. """ if parameter is None: try: parameter = list(self[self.s...
python
{ "resource": "" }
q32164
MCMCMetadataIO.iterations
train
def iterations(self, parameter): """Returns the iteration each sample occurred at."""
python
{ "resource": "" }
q32165
MCMCMetadataIO.write_sampler_metadata
train
def write_sampler_metadata(self, sampler): """Writes the sampler's metadata.""" self.attrs['sampler'] = sampler.name
python
{ "resource": "" }
q32166
MCMCMetadataIO.write_acls
train
def write_acls(self, acls): """Writes the given autocorrelation lengths. The ACL of each parameter is saved to ``[sampler_group]/acls/{param}']``. The maximum over all the parameters is saved to the file's 'acl' attribute. Parameters ---------- acls : dict ...
python
{ "resource": "" }
q32167
MCMCMetadataIO.read_acls
train
def read_acls(self): """Reads the acls of all the parameters. Returns ------- dict
python
{ "resource": "" }
q32168
MCMCMetadataIO.write_burn_in
train
def write_burn_in(self, burn_in): """Write the given burn-in data to the given filename.""" group = self[self.sampler_group] group.attrs['burn_in_test'] = burn_in.burn_in_test group.attrs['is_burned_in'] = burn_in.is_burned_in group.attrs['burn_in_iteration'] = burn_in.burn_in_it...
python
{ "resource": "" }
q32169
MCMCMetadataIO.extra_args_parser
train
def extra_args_parser(parser=None, skip_args=None, **kwargs): """Create a parser to parse sampler-specific arguments for loading samples. Parameters ---------- parser : argparse.ArgumentParser, optional Instead of creating a parser, add arguments to the given one. If...
python
{ "resource": "" }
q32170
SingleTempMCMCIO.write_samples
train
def write_samples(self, samples, parameters=None, last_iteration=None): """Writes samples to the given file. Results are written to ``samples_group/{vararg}``, where ``{vararg}`` is the name of a model params. The samples are written as an ``nwalkers x niterations`` array. If samples al...
python
{ "resource": "" }
q32171
SingleTempMCMCIO.read_raw_samples
train
def read_raw_samples(self, fields, thin_start=None, thin_interval=None, thin_end=None, iteration=None, walkers=None, flatten=True): """Base function for reading samples. Parameters ----------- fields : list The list of field ...
python
{ "resource": "" }
q32172
setup_datafind_runtime_frames_single_call_perifo
train
def setup_datafind_runtime_frames_single_call_perifo(cp, scienceSegs, outputDir, tags=None): """ This function uses the glue.datafind library to obtain the location of all the frame files that will be needed to cover the analysis of the data given in science...
python
{ "resource": "" }
q32173
setup_datafind_runtime_frames_multi_calls_perifo
train
def setup_datafind_runtime_frames_multi_calls_perifo(cp, scienceSegs, outputDir, tags=None): """ This function uses the glue.datafind library to obtain the location of all the frame files that will be needed to cover the analysis of the data given in ...
python
{ "resource": "" }
q32174
setup_datafind_from_pregenerated_lcf_files
train
def setup_datafind_from_pregenerated_lcf_files(cp, ifos, outputDir, tags=None): """ This function is used if you want to run with pregenerated lcf frame cache files. Parameters ----------- cp : ConfigParser.ConfigParser instance This contains a representation of the information stored w...
python
{ "resource": "" }
q32175
convert_cachelist_to_filelist
train
def convert_cachelist_to_filelist(datafindcache_list): """ Take as input a list of glue.lal.Cache objects and return a pycbc FileList containing all frames within those caches. Parameters ----------- datafindcache_list : list of glue.lal.Cache objects The list of cache files to convert....
python
{ "resource": "" }
q32176
get_science_segs_from_datafind_outs
train
def get_science_segs_from_datafind_outs(datafindcaches): """ This function will calculate the science segments that are covered in the OutGroupList containing the frame files returned by various calls to the datafind server. This can then be used to check whether this list covers what it is expected...
python
{ "resource": "" }
q32177
get_missing_segs_from_frame_file_cache
train
def get_missing_segs_from_frame_file_cache(datafindcaches): """ This function will use os.path.isfile to determine if all the frame files returned by the local datafind server actually exist on the disk. This can then be used to update the science times if needed. Parameters ----------- dat...
python
{ "resource": "" }
q32178
setup_datafind_server_connection
train
def setup_datafind_server_connection(cp, tags=None): """ This function is resposible for setting up the connection with the datafind server. Parameters ----------- cp : pycbc.workflow.configuration.WorkflowConfigParser The memory representation of the ConfigParser Returns ------...
python
{ "resource": "" }
q32179
get_segment_summary_times
train
def get_segment_summary_times(scienceFile, segmentName): """ This function will find the times for which the segment_summary is set for the flag given by segmentName. Parameters ----------- scienceFile : SegFile The segment file that we want to use to determine this. segmentName : s...
python
{ "resource": "" }
q32180
run_datafind_instance
train
def run_datafind_instance(cp, outputDir, connection, observatory, frameType, startTime, endTime, ifo, tags=None): """ This function will query the datafind server once to find frames between the specified times for the specified frame type and observatory. Parameters -----...
python
{ "resource": "" }
q32181
log_datafind_command
train
def log_datafind_command(observatory, frameType, startTime, endTime, outputDir, **dfKwargs): """ This command will print an equivalent gw_data_find command to disk that can be used to debug why the internal datafind module is not working. """ # FIXME: This does not accuratel...
python
{ "resource": "" }
q32182
segment_snrs
train
def segment_snrs(filters, stilde, psd, low_frequency_cutoff): """ This functions calculates the snr of each bank veto template against the segment Parameters ---------- filters: list of FrequencySeries The list of bank veto templates filters. stilde: FrequencySeries The current ...
python
{ "resource": "" }
q32183
template_overlaps
train
def template_overlaps(bank_filters, template, psd, low_frequency_cutoff): """ This functions calculates the overlaps between the template and the bank veto templates. Parameters ---------- bank_filters: List of FrequencySeries template: FrequencySeries psd: FrequencySeries low_frequency...
python
{ "resource": "" }
q32184
bank_chisq_from_filters
train
def bank_chisq_from_filters(tmplt_snr, tmplt_norm, bank_snrs, bank_norms, tmplt_bank_matches, indices=None): """ This function calculates and returns a TimeSeries object containing the bank veto calculated over a segment. Parameters ---------- tmplt_snr: TimeSeries The SNR time seri...
python
{ "resource": "" }
q32185
start_end_from_segments
train
def start_end_from_segments(segment_file): """ Return the start and end time arrays from a segment file. Parameters ---------- segment_file: xml segment file Returns ------- start: numpy.ndarray end: numpy.ndarray """ from glue.ligolw.ligolw import LIGOLWContentHandler as h...
python
{ "resource": "" }
q32186
indices_within_times
train
def indices_within_times(times, start, end): """ Return an index array into times that lie within the durations defined by start end arrays Parameters ---------- times: numpy.ndarray Array of times start: numpy.ndarray Array of duration start times end: numpy.ndarray ...
python
{ "resource": "" }
q32187
indices_outside_times
train
def indices_outside_times(times, start, end): """ Return an index array into times that like outside the durations defined by start end arrays Parameters ---------- times: numpy.ndarray Array of times start: numpy.ndarray Array of duration start times end: numpy.ndarray ...
python
{ "resource": "" }
q32188
select_segments_by_definer
train
def select_segments_by_definer(segment_file, segment_name=None, ifo=None): """ Return the list of segments that match the segment name Parameters ---------- segment_file: str path to segment xml file segment_name: str Name of segment ifo: str, optional Returns ------- ...
python
{ "resource": "" }
q32189
indices_within_segments
train
def indices_within_segments(times, segment_files, ifo=None, segment_name=None): """ Return the list of indices that should be vetoed by the segments in the list of veto_files. Parameters ---------- times: numpy.ndarray of integer type Array of gps start times segment_files: string or li...
python
{ "resource": "" }
q32190
indices_outside_segments
train
def indices_outside_segments(times, segment_files, ifo=None, segment_name=None): """ Return the list of indices that are outside the segments in the list of segment files. Parameters ---------- times: numpy.ndarray of integer type Array of gps start times segment_files: string or list o...
python
{ "resource": "" }
q32191
get_segment_definer_comments
train
def get_segment_definer_comments(xml_file, include_version=True): """Returns a dict with the comment column as the value for each segment""" from glue.ligolw.ligolw import LIGOLWContentHandler as h lsctables.use_in(h) # read segment definer table xmldoc, _ = ligolw_utils.load_fileobj(xml_file, ...
python
{ "resource": "" }
q32192
Merger.strain
train
def strain(self, ifo, duration=32, sample_rate=4096): """ Return strain around the event Currently this will return the strain around the event in the smallest format available. Selection of other data is not yet available. Parameters ---------- ifo: str The...
python
{ "resource": "" }
q32193
make_inference_prior_plot
train
def make_inference_prior_plot(workflow, config_file, output_dir, sections=None, name="inference_prior", analysis_seg=None, tags=None): """ Sets up the corner plot of the priors in the workflow. Parameters ---------- workflow: pycbc.workflow.Workflow The c...
python
{ "resource": "" }
q32194
make_inference_summary_table
train
def make_inference_summary_table(workflow, inference_file, output_dir, variable_args=None, name="inference_table", analysis_seg=None, tags=None): """ Sets up the corner plot of the posteriors in the workflow. Parameters ---------- workflow: pycbc.workflow.Workflo...
python
{ "resource": "" }
q32195
make_inference_acceptance_rate_plot
train
def make_inference_acceptance_rate_plot(workflow, inference_file, output_dir, name="inference_rate", analysis_seg=None, tags=None): """ Sets up the acceptance rate plot in the workflow. Parameters ---------- workflow: pycbc.workflow.Workflow The core workflow instance we are...
python
{ "resource": "" }
q32196
make_inference_inj_plots
train
def make_inference_inj_plots(workflow, inference_files, output_dir, parameters, name="inference_recovery", analysis_seg=None, tags=None): """ Sets up the recovered versus injected parameter plot in the workflow. Parameters ---------- workflow: p...
python
{ "resource": "" }
q32197
get_science_segments
train
def get_science_segments(workflow, out_dir, tags=None): """ Get the analyzable segments after applying ini specified vetoes. Parameters ----------- workflow : Workflow object Instance of the workflow object out_dir : path Location to store output files tags : list of strings...
python
{ "resource": "" }
q32198
get_files_for_vetoes
train
def get_files_for_vetoes(workflow, out_dir, runtime_names=None, in_workflow_names=None, tags=None): """ Get the various sets of veto segments that will be used in this analysis. Parameters ----------- workflow : Workflow object Instance of the workflow object ou...
python
{ "resource": "" }
q32199
get_cumulative_veto_group_files
train
def get_cumulative_veto_group_files(workflow, option, cat_files, out_dir, execute_now=True, tags=None): """ Get the cumulative veto files that define the different backgrounds we want to analyze, defined by groups of vetos. Parameters ----------- workflow : W...
python
{ "resource": "" }