Loading minke/antenna.py +7 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ def response( gpsTime, rightAscension, declination, inclination, psi_rad = polarization/180.0*pi iota_rad = inclination/180.0*pi else: raise ValueError, "Unknown unit %s" % unit raise ValueError("Unknown unit %s" % unit) # calculate GMST if the GPS time gps = lal.LIGOTimeGPS( gpsTime ) Loading @@ -49,8 +49,7 @@ def response( gpsTime, rightAscension, declination, inclination, try: detector=lal.cached_detector_by_prefix[det] except KeyError: raise ValueError, "ERROR. Key %s is not a valid detector prefix."\ % (det) raise ValueError("ERROR. Key %s is not a valid detector prefix." % (det)) # get the correct response data response = detector.response Loading Loading @@ -97,17 +96,17 @@ def timeDelay( gpsTime, rightAscension, declination, unit, det1, det2 ): ra_rad = rightAscension/180.0*pi de_rad = declination/180.0*pi else: raise ValueError, "Unknown unit %s" % unit raise ValueError("Unknown unit %s" % unit) # check input values if ra_rad<0.0 or ra_rad> 2*pi: raise ValueError, "ERROR. right ascension=%f "\ raise ValueError( "ERROR. right ascension=%f "\ "not within reasonable range."\ % (rightAscension) % (rightAscension)) if de_rad<-pi or de_rad> pi: raise ValueError, "ERROR. declination=%f not within reasonable range."\ % (declination) raise ValueError( "ERROR. declination=%f not within reasonable range."\ % (declination)) if det1 == det2: return 0.0 Loading minke/mdctools.py +30 −6 Original line number Diff line number Diff line """ 88b d88 88 88 888b d888 "" 88 88`8b d8'88 88 88 `8b d8' 88 88 8b,dPPYba, 88 ,d8 ,adPPYba, 88 `8b d8' 88 88 88P' `"8a 88 ,a8" a8P_____88 88 `8b d8' 88 88 88 88 8888[ 8PP""""""" 88 `888' 88 88 88 88 88`"Yba, "8b, ,aa 88 `8' 88 88 88 88 88 `Y8a `"Ybbd8"' -------------------------------------------------------- This file is a part of Minke, a tool for generating simulated gravitational wave signals, used for characterising and training search algorithms. Minke was created by Daniel Williams, based on work started by Chris Pankow and others, and is built around the LALSimulation library. """ from glue.ligolw import ligolw, utils, lsctables lsctables.use_in(ligolw.LIGOLWContentHandler); import numpy Loading Loading @@ -484,15 +506,17 @@ class MDCSet(): energy = self.egw[row] row = self.waveforms[row] output = [] output.append(self.name) # GravEn_SimID output.append(strains[0]) # SimHrss output.append(energy) # SimEgwR2 output.append(strains[0]) # GravEn_Ampl output.append(row.incl) # Internal_x (currently not implemented) output.append(row.phi) # Intenal_phi ('') output.append(np.cos(row.ra)) # cos(External_x) output.append(row.dec) # External_phi output.append(row.psi) # External_psi output.append(np.cos(row.incl)) # Internal_x the cosine of the angle the LOS makes with axis of angular momentum output.append(row.phi) # Intenal_phi angle between source x-axis and the LOS output.append(np.cos(np.pi/2.0 - row.dec)) # cos(External_x) # this needs to be the co-declination output.append(row.ra if row.ra < np.pi else row.ra - 2*np.pi) # ^ External_phi # This is the RA projected onto an Earth-based coordinate system output.append(row.psi) # External_psi # source's polarisation angle output.append(frame.start) # FrameGPS output.append(row.time_geocent_gps) # EarthCtrGPS output.append(rowname) # SimName Loading minke/sources.py +2 −0 Original line number Diff line number Diff line Loading @@ -635,6 +635,8 @@ class Mueller2012(Supernova): """ waveform = "Mueller+12" has_memory = True def __init__(self, theta, phi, time, sky_dist=uniform_sky, filepath=None, family="L15-3", decomposed_path=None): """ Loading Loading
minke/antenna.py +7 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ def response( gpsTime, rightAscension, declination, inclination, psi_rad = polarization/180.0*pi iota_rad = inclination/180.0*pi else: raise ValueError, "Unknown unit %s" % unit raise ValueError("Unknown unit %s" % unit) # calculate GMST if the GPS time gps = lal.LIGOTimeGPS( gpsTime ) Loading @@ -49,8 +49,7 @@ def response( gpsTime, rightAscension, declination, inclination, try: detector=lal.cached_detector_by_prefix[det] except KeyError: raise ValueError, "ERROR. Key %s is not a valid detector prefix."\ % (det) raise ValueError("ERROR. Key %s is not a valid detector prefix." % (det)) # get the correct response data response = detector.response Loading Loading @@ -97,17 +96,17 @@ def timeDelay( gpsTime, rightAscension, declination, unit, det1, det2 ): ra_rad = rightAscension/180.0*pi de_rad = declination/180.0*pi else: raise ValueError, "Unknown unit %s" % unit raise ValueError("Unknown unit %s" % unit) # check input values if ra_rad<0.0 or ra_rad> 2*pi: raise ValueError, "ERROR. right ascension=%f "\ raise ValueError( "ERROR. right ascension=%f "\ "not within reasonable range."\ % (rightAscension) % (rightAscension)) if de_rad<-pi or de_rad> pi: raise ValueError, "ERROR. declination=%f not within reasonable range."\ % (declination) raise ValueError( "ERROR. declination=%f not within reasonable range."\ % (declination)) if det1 == det2: return 0.0 Loading
minke/mdctools.py +30 −6 Original line number Diff line number Diff line """ 88b d88 88 88 888b d888 "" 88 88`8b d8'88 88 88 `8b d8' 88 88 8b,dPPYba, 88 ,d8 ,adPPYba, 88 `8b d8' 88 88 88P' `"8a 88 ,a8" a8P_____88 88 `8b d8' 88 88 88 88 8888[ 8PP""""""" 88 `888' 88 88 88 88 88`"Yba, "8b, ,aa 88 `8' 88 88 88 88 88 `Y8a `"Ybbd8"' -------------------------------------------------------- This file is a part of Minke, a tool for generating simulated gravitational wave signals, used for characterising and training search algorithms. Minke was created by Daniel Williams, based on work started by Chris Pankow and others, and is built around the LALSimulation library. """ from glue.ligolw import ligolw, utils, lsctables lsctables.use_in(ligolw.LIGOLWContentHandler); import numpy Loading Loading @@ -484,15 +506,17 @@ class MDCSet(): energy = self.egw[row] row = self.waveforms[row] output = [] output.append(self.name) # GravEn_SimID output.append(strains[0]) # SimHrss output.append(energy) # SimEgwR2 output.append(strains[0]) # GravEn_Ampl output.append(row.incl) # Internal_x (currently not implemented) output.append(row.phi) # Intenal_phi ('') output.append(np.cos(row.ra)) # cos(External_x) output.append(row.dec) # External_phi output.append(row.psi) # External_psi output.append(np.cos(row.incl)) # Internal_x the cosine of the angle the LOS makes with axis of angular momentum output.append(row.phi) # Intenal_phi angle between source x-axis and the LOS output.append(np.cos(np.pi/2.0 - row.dec)) # cos(External_x) # this needs to be the co-declination output.append(row.ra if row.ra < np.pi else row.ra - 2*np.pi) # ^ External_phi # This is the RA projected onto an Earth-based coordinate system output.append(row.psi) # External_psi # source's polarisation angle output.append(frame.start) # FrameGPS output.append(row.time_geocent_gps) # EarthCtrGPS output.append(rowname) # SimName Loading
minke/sources.py +2 −0 Original line number Diff line number Diff line Loading @@ -635,6 +635,8 @@ class Mueller2012(Supernova): """ waveform = "Mueller+12" has_memory = True def __init__(self, theta, phi, time, sky_dist=uniform_sky, filepath=None, family="L15-3", decomposed_path=None): """ Loading