Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a8c2105
first implementation, small improvement on test example, need to impl…
corentinravoux Jul 25, 2024
4b8bfbf
important fix: use jax with 64 bit
corentinravoux Jul 26, 2024
25494ce
format
corentinravoux Jul 26, 2024
c43f3fd
implementation of interpolation jax enabled
corentinravoux Jul 26, 2024
dcde3dc
fixes for jax optimization
corentinravoux Jul 26, 2024
923ae4b
format
corentinravoux Jul 26, 2024
8eabace
update for new scipy version
corentinravoux Jul 26, 2024
a5ff0ac
format
corentinravoux Jul 26, 2024
5a06362
plot utils
corentinravoux Jul 26, 2024
2478fea
improve fit
corentinravoux Jul 31, 2024
1f547cb
update test notebook
corentinravoux Jul 31, 2024
abfe716
Merge pull request #37 from corentinravoux/main
corentinravoux Jul 31, 2024
b9f5564
Merge pull request #38 from corentinravoux/main
corentinravoux Aug 1, 2024
95497db
plot improvement
corentinravoux Aug 12, 2024
e6cb615
easier jit + extra jit
Aug 20, 2024
751b51e
specified import error
Aug 20, 2024
05ddccd
add regularization option
bastiencarreres Aug 22, 2024
c94574d
replace interp1d by np interp
bastiencarreres Aug 23, 2024
c8eb9c7
Merge pull request #40 from corentinravoux/jax_bast
corentinravoux Aug 26, 2024
d3f89db
fix
corentinravoux Aug 26, 2024
bfe66ec
remove the jit
bastiencarreres Aug 26, 2024
b228731
fix plotting routines
corentinravoux Sep 2, 2024
a109821
Merge pull request #41 from corentinravoux/main
corentinravoux Sep 2, 2024
2321e82
add mask + retrun to flat function
bastiencarreres Sep 3, 2024
8009a0b
Merge branch 'jax' of https://github.com/corentinravoux/flip into jax
bastiencarreres Sep 3, 2024
32ffcdb
small fix and format
corentinravoux Sep 4, 2024
cc3d678
remove variance term for cross-correlation
corentinravoux Sep 4, 2024
8bb27a6
format
corentinravoux Sep 4, 2024
196b9ae
up
bastiencarreres Sep 4, 2024
59335ef
Merge branch 'jax' of https://github.com/corentinravoux/flip into jax
bastiencarreres Sep 4, 2024
204894c
improving mcmc fitter, still a restart bug
corentinravoux Sep 5, 2024
606ea12
plot util changes
corentinravoux Sep 6, 2024
0076878
add info for a crash (when mcmc chain is empty)
corentinravoux Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions flip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

import os

from flip.utils import create_log

log = create_log()
from . import covariance, fisher, fitter, gridding, likelihood, power_spectra, utils

try:
import jax

jax.config.update("jax_enable_x64", True)
except:
log.add("Jax is not available, loading numpy and scipy instead")

__version__ = "1.0.0"
__flip_dir_path__ = os.path.dirname(__file__)
1 change: 1 addition & 0 deletions flip/covariance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Init file of the flip.covariance package."""

from . import adamsblake17plane, adamsblake20, carreres23, lai22, ravouxcarreres, rcrk24
from . import cov_utils
from .covariance import CovMatrix
13 changes: 12 additions & 1 deletion flip/covariance/cov_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ def return_full_cov(cov):
return full_cov


def return_flat_cov(cov):
variance_val = cov[0, 0]
flat_cov = cov[np.triu_indices_from(cov, k=1)]
flat_cov = np.insert(flat_cov, 0, variance_val)
return flat_cov


def return_flat_cross_cov(cov):
return cov.flatten()


def return_full_cov_cross(cov, number_objects_g, number_objects_v):
"""
The return_full_cov_cross function takes in a covariance matrix and the number of objects in each band.
Expand All @@ -245,7 +256,7 @@ def return_full_cov_cross(cov, number_objects_g, number_objects_v):
The full covariance matrix

"""
full_cov = cov[1:].reshape((number_objects_g, number_objects_v))
full_cov = cov.reshape((number_objects_g, number_objects_v))
return full_cov


Expand Down
Loading