Skip to content

Commit

Permalink
uddating hoghead mount dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
llondon6 committed Jun 12, 2020
1 parent 97615f7 commit 1b12671
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 46 deletions.
226 changes: 203 additions & 23 deletions examples/coprecessing_frames.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions nrutils/config/hogshead.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ institute = bam
metadata_id = .bbh

# Directory where all smulation folders are stored. The assumtion is that each simulation folder contains a related metadata file with a filname which contains the metadata_id
#catalog_dir = ~/MOUNT/tmp/mnt/hogshead/NR_data/ReducedData-hogshead/dirac-nr-followup/
catalog_dir = /Users/jthompson/hmnt/hogshead/NR_data/ReducedData-hogshead/,/Users/shrobanaghosh/mnt/NR_data/ReducedData-hogshead/,/mnt/hogshead/NR_data/ReducedData-hogshead/, ~/MOUNT/tmp/mnt/hogshead/NR_data/ReducedData-hogshead/,/Users/markodh/sshfs-atlas2/mnt/hogshead/NR_data/ReducedData-hogshead/, /Users/Eleanor/Documents/Jupyter/Precession/Precession_angles/minion_data/,/Users/alex/mount/minion/NR_data/ReducedData-hogshead/
#catalog_dir = ~/MOUNT/tmp/gluster/hogshead/NR_data/ReducedData-hogshead/dirac-nr-followup/
catalog_dir = /Users/jthompson/hmnt/hogshead/NR_data/ReducedData-hogshead/,/Users/shrobanaghosh/gluster/NR_data/ReducedData-hogshead/,/gluster/hogshead/NR_data/ReducedData-hogshead/, ~/MOUNT/tmp/gluster/hogshead/NR_data/ReducedData-hogshead/,/Users/markodh/sshfs-atlas2/gluster/hogshead/NR_data/ReducedData-hogshead/, /Users/Eleanor/Documents/Jupyter/Precession/Precession_angles/minion_data/,/Users/alex/mount/minion/NR_data/ReducedData-hogshead/

# NOTE standard parameter order for every simulation catalog
# extraction_parameter, l, m, level
Expand Down
53 changes: 32 additions & 21 deletions nrutils/core/nrsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ def isondisk(e):
from numpy import array
# Let the people know
if verbose:
warning('Applying remant fit to scentry objects. This should be done if the final mass and spin meta data are not trustworth. '+magenta('The fit being used only works for non-precessing systems.'))
warning('Applying remant fit to scentry objects. This should be done if the final mass and spin meta data are not trustworthy. '+magenta('The fit being used only works for non-precessing systems.'))
#
for e in catalog:
#e.mf,e.xf = Mf14067295(e.m1,e.m2,e.X1[-1],e.X2[-1]),jf14067295(e.m1,e.m2,e.X1[-1],e.X2[-1])
Expand Down Expand Up @@ -5114,30 +5114,41 @@ def load_dynamics(this,waveform_times=None,verbose=False,output=False):
sco = this.__scentry__
alert('Retrieving method from handler for loading source dyanmics as this is specific to BAM, GT-MAYA, SXS, etc ...',verbose=verbose)
handler = sco.loadhandler()
alert('Loading/Learning dynamics ...',verbose=verbose)


#
dynamics = handler.learn_source_dynamics( sco, dynamics_times,verbose= verbose )
dynamics['waveform_times'] = waveform_times[:len(dynamics['dynamics_times'])]
__HAS_DYNAMICS__ = 'learn_source_dynamics' in handler.__dict__
if __HAS_DYNAMICS__:
alert('Loading/Learning dynamics ...',verbose=verbose)
dynamics = handler.learn_source_dynamics( sco, dynamics_times,verbose= verbose )
dynamics['waveform_times'] = waveform_times[:len(dynamics['dynamics_times'])]
else:
warning('Dynamics will not belo loaded becuase there is NO method named "learn_source_dynamics" in the handler.')


# Check for consistency between dynamics data and bbh file
test_quantity = dot(this.L/norm(this.L),dynamics['L'][0]/norm(dynamics['L'][0]))
if test_quantity<=0:
print('bbh: ',this.L)
print('dyn: ',dynamics['L'][0])
print('\n')
warning(red('There is an apparent discrepancy between the BBH L and the dynamics L. Either or both could be incorrect. For now, we will assume the dynamics data are correcect, and so use this in place of the BBH L when appropriate.'))
print('\n')
this.L = dynamics['L'][0]
this.L1 = dynamics['L1'][0]
this.L2 = dynamics['L2'][0]
this.J = this.L+this.S

alert('Done.',verbose=verbose)
if output:
return dynamics

if __HAS_DYNAMICS__:
test_quantity = dot(this.L/norm(this.L),dynamics['L'][0]/norm(dynamics['L'][0]))
if test_quantity<=0:
print('bbh: ',this.L)
print('dyn: ',dynamics['L'][0])
print('\n')
warning(red('There is an apparent discrepancy between the BBH L and the dynamics L. Either or both could be incorrect. For now, we will assume the dynamics data are correcect, and so use this in place of the BBH L when appropriate.'))
print('\n')
this.L = dynamics['L'][0]
this.L1 = dynamics['L1'][0]
this.L2 = dynamics['L2'][0]
this.J = this.L+this.S

alert('Done.',verbose=verbose)
if output:
return dynamics
else:
this.dynamics = dynamics
else:
this.dynamics = dynamics
warning('We cannot check the consistency of dynamics and metadata information.')



#
def __flip_cross_sign_convention__(this):
Expand Down

0 comments on commit 1b12671

Please sign in to comment.