Skip to content

Conversation

darthoctopus
Copy link
Collaborator

@darthoctopus darthoctopus commented May 24, 2025

  • Rescue some convenience wrapping functions around astroquery from pbjam1
  • Changing order in which hard-coded priors were defined in different l1models, to allow those parameters also to be overriden by addPriors
  • Separate out construction of l1model, and running dynesty to sample its posterior distribution
  • a few jax fixes for the RGB mode-coupling routine (so that we can pass any other number of iterations without making jax recompile an unrolled loop)

@darthoctopus darthoctopus requested a review from nielsenmb June 5, 2025 05:11
except:
return None

def _queryGaia(ID=None,coords=None, radius = 20):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check that queryGaia still works? I think there is something with them changing permissions.

Also if this is adding a new module you'll need to update the docs accordingly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me out of the box with a fresh env. I'll write up some docs.


# The inclination prior is a sine truncated between 0, and pi/2.
self.priors['inc'] = dist.truncsine()
self.priors['inc'] = dist.truncsine()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for changing the order of things here you'll need to check that it doesn't influence the sampling.

I remember having problems with that at some point, where I thought using dictionaries should have solved this, but apparently it didn't.

Just so we aren't sampling nurot_e when we think it's something else like eps_g.

raise ValueError(f'Model {model} is invalid. Please use either MS, SG or RGB.')

def runl1model(self, progress=True, dynamic=False, minSamples=5000, sampler_kwargs={}, logl_kwargs={}, **kwargs):
'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use " " " instead of ' ' '.

self.Fpp(num_g, nu_p, nu_g, self.obs['dnu'][0], DPi1), lmbda=lmbda)
return a, b

num_p, num_g = jax.lax.fori_loop(0, self.rootiter, _body, (nu_p, nu_g))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this improve the compile-time?

We of course also need to verify that results don't change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants