This file contains hidden or 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
# The maketaper functoin takes in a time series (any function domain really), and a 2x1 iterable of indeces defining the start and end of the taper. | |
# For example: | |
# Make fake data | |
mock_times = arange(1,10) | |
mock_range_values = ones_like( dummy_times ) | |
index_start = 1 | |
index_end = 4 | |
# Create a taper function |
This file contains hidden or 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
import nrutils | |
# Print the location of internal directories | |
nrutils.core.my_settings.show() |
This file contains hidden or 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
# Import useful things | |
from nrutils import scsearch, gwylm, alert | |
# Find some simulations | |
alert('Finding simulations',header=True) | |
A = scsearch(q=[3,5],nonspinning=True,verbose=True,institute='gt') | |
# Choose one, and print its properties | |
alert('Printing props for a single simulation',header=True) | |
a = A[0]; | |
for k in a.__dict__: print '>> %s = %s'%(k,str(a.__dict__[k])) | |
# Load select multipoles from this simulation and get rid of junk |
This file contains hidden or 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
# | |
def pnw0(m1,m2,D=10.0): | |
# https://arxiv.org/pdf/1310.1528v4.pdf | |
# Equation 228 | |
# 2nd Reference: arxiv:0710.0614v1 | |
# NOTE: this outputs orbital frequency | |
from numpy import sqrt,zeros,pi,array,sum | |
# | |
G = 1.0 | |
c = 1.0 |
This file contains hidden or 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
# Strain via ffi method | |
def calchlm(this,w22=None): | |
# Calculate strain according to the fixed frequency method of http://arxiv.org/pdf/1006.1632v3 | |
# | |
from numpy import array,double | |
# If there is no w22 given, then use the internally defined value of wstart | |
if w22 is None: |