Skip to content

Commit

Permalink
Reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyuon committed Aug 30, 2024
1 parent f046a70 commit 5d1458e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/jimgw/single_event/runManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def __init__(self, **kwargs):

local_prior = self.initialize_prior()
sample_transforms, likelihood_transforms = self.initialize_transforms()
local_likelihood = self.initialize_likelihood(local_prior, sample_transforms, likelihood_transforms)
local_likelihood = self.initialize_likelihood(
local_prior, sample_transforms, likelihood_transforms
)
self.jim = Jim(
local_likelihood,
local_prior,
Expand All @@ -124,7 +126,12 @@ def load_from_path(self, path: str) -> SingleEventRun:

### Initialization functions ###

def initialize_likelihood(self, prior: prior.CombinePrior, sample_transforms: transforms.Transform, likelihood_transforms: transforms.Transform) -> SingleEventLiklihood:
def initialize_likelihood(
self,
prior: prior.CombinePrior,
sample_transforms: transforms.Transform,
likelihood_transforms: transforms.Transform,
) -> SingleEventLiklihood:
"""
Since prior contains information about types, naming and ranges of parameters,
some of the likelihood class require the prior to be initialized, such as the
Expand Down Expand Up @@ -473,4 +480,4 @@ def save_summary(self, path: str = "", **kwargs):
networkSNR = jnp.sum(jnp.array(self.SNRs) ** 2) ** (0.5)
print("network SNR is", networkSNR)
sys.stdout.close()
sys.stdout=orig_stdout
sys.stdout = orig_stdout

0 comments on commit 5d1458e

Please sign in to comment.