-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d6b9dd
commit 09a8c80
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import minke | ||
import astropy.units as u | ||
|
||
from minke.models.cbc import IMRPhenomPv1 | ||
from minke.detector import AdvancedLIGOHanford | ||
|
||
model = IMRPhenomPv1() | ||
|
||
parameters = {"mass_ratio": 0.7, "total_mass": 100*u.solMass, "luminosity_distance": 10*u.megaparsec} | ||
|
||
data = model.time_domain(parameters) | ||
|
||
data = model.time_domain(mass_ratio=0.7, total_mass=100*u.solMass) | ||
|
||
f = data['plus'].plot() | ||
f.savefig("docs/images/cbc/waveform-imrphenompv1.png") | ||
|
||
detector = AdvancedLIGOHanford() | ||
|
||
projected = data.project(detector, | ||
ra=1, dec=0.5, | ||
iota=0.4, | ||
phi_0=0, | ||
psi=0 | ||
) | ||
|
||
f = projected.plot() | ||
f.savefig("projected_waveform.png") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from minke.noise import AdvancedLIGO | ||
|
||
noise = AdvancedLIGO() | ||
|
||
data = noise.time_series(duration=4, sample_rate=16384) | ||
|
||
f = data.plot() | ||
f.savefig("noise.png") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from minke.noise import AdvancedLIGO | ||
import astropy.units as u | ||
|
||
from minke.models.cbc import IMRPhenomPv2 | ||
from minke.detector import AdvancedLIGOHanford | ||
|
||
noise = AdvancedLIGO() | ||
|
||
noise_ts = noise.time_series(duration=4, sample_rate=16384, epoch=998) | ||
|
||
model = IMRPhenomPv2() | ||
|
||
parameters = {"mass_ratio": 0.7, "total_mass": 100*u.solMass, "luminosity_distance": 100*u.megaparsec, "gpstime": 1000} | ||
|
||
data = model.time_domain(parameters, times=noise_ts.times) | ||
f = data['plus'].plot() | ||
f.savefig("waveform.png") | ||
|
||
detector = AdvancedLIGOHanford() | ||
|
||
projected = data.project(detector, | ||
ra=1, dec=0.5, | ||
iota=0.4, | ||
phi_0=0, | ||
psi=0 | ||
) | ||
injection = (noise_ts + projected) | ||
f = injection.plot() | ||
f.savefig("projected_injection.png") | ||
injection.write("test_injection.gwf", format="gwf") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from minke.injection import make_injection_zero_noise | ||
from minke.noise import AdvancedLIGO | ||
from minke.models.cbc import IMRPhenomPv2 | ||
from minke.detector import AdvancedLIGOHanford | ||
|
||
import astropy.units as u | ||
|
||
|
||
detectors = {"AdvancedLIGOHanford": "AdvancedLIGO"} | ||
|
||
parameters = {"mass_ratio": 0.7, | ||
"total_mass": 100*u.solMass, | ||
"luminosity_distance": 100*u.megaparsec, | ||
"ra": 1, | ||
"dec": 0.5, | ||
"iota": 0.4, | ||
"phi_0": 0, | ||
"psi": 0, | ||
"gpstime": 1000} | ||
|
||
injection = make_injection_zero_noise(detectors=detectors, injection_parameters=parameters, duration=4, sample_rate=16384, epoch=998)['H1'] | ||
|
||
f = injection.plot() | ||
f.savefig("injection_function_zero.png") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import minke | ||
import astropy.units as u | ||
|
||
from minke.models.bursts import SineGaussian | ||
from minke.detector import AdvancedLIGOHanford | ||
|
||
model = SineGaussian() | ||
|
||
parameters = {"centre_frequency": 20, | ||
"phase": 0, | ||
"eccentricity": 0, | ||
"q": 1., | ||
"sample_rate": 4096 * u.Hertz, | ||
"gsptime": 998, | ||
"hrss": 1e-22, | ||
"duration": 2*u.second} | ||
|
||
data = model.time_domain(parameters) | ||
f = data['plus'].plot() | ||
f.savefig("sinegaussian.png") | ||
|
||
detector = AdvancedLIGOHanford() | ||
|
||
projected = data.project(detector, | ||
ra=1, dec=0.5, | ||
iota=0.4, | ||
phi_0=0, | ||
psi=0 | ||
) | ||
|
||
f = projected.plot() | ||
f.savefig("projected_sinegaussian.png") |