Skip to content

Commit

Permalink
Dev (#39)
Browse files Browse the repository at this point in the history
* v3.2.2 dev see changelog.rst for changes

* some changes, see changelog.rst

* v3.3.0 see change_log.rst

* v3.3.1 see change_log.rst

* bump version to 3.3.2; see changelog

* bump version to 3.3.3; update changelog with new features and fixes

* add Read the Docs configuration and documentation requirements
  • Loading branch information
tundeakins authored Feb 3, 2025
1 parent f054055 commit 8b8ab2a
Show file tree
Hide file tree
Showing 89 changed files with 137,684 additions and 41,930 deletions.
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "2"

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

python:
install:
- requirements: docs/requirements.txt

sphinx:
configuration: docs/conf.py
1 change: 0 additions & 1 deletion CONAN3/VERSION.dat

This file was deleted.

1 change: 1 addition & 0 deletions CONAN3/VERSION.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '3.3.3'
13 changes: 8 additions & 5 deletions CONAN3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
__all__ = ["load_lightcurves", "load_rvs", "fit_setup", "run_fit", "create_configfile","load_configfile","fit_configfile"]

from ._classes import load_lightcurves, load_rvs, fit_setup, load_result, __default_backend__
from ._classes import (load_lightcurves, load_rvs, fit_setup, load_result,
get_parameter_names, compare_results, __default_backend__)
from .conf import create_configfile, load_configfile,fit_configfile
from .fit_data import run_fit
from .VERSION import __version__

# from os import path
# here = path.abspath(path.dirname(__file__))
# with open(path.join(here, 'VERSION.dat')) as version_file:
# __version__ = version_file.read().strip()

from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'VERSION.dat')) as version_file:
__version__ = version_file.read().strip()
Binary file modified CONAN3/__pycache__/__init__.cpython-38.pyc
100755 → 100644
Binary file not shown.
Binary file modified CONAN3/__pycache__/_classes.cpython-38.pyc
100755 → 100644
Binary file not shown.
Binary file modified CONAN3/__pycache__/fit_data.cpython-38.pyc
100755 → 100644
Binary file not shown.
5,408 changes: 3,705 additions & 1,703 deletions CONAN3/_classes.py

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions CONAN3/basecoeff_setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import numpy as np

def basecoeff(ibase,spline,init=None,lims=None):
def basecoeff(ibase,spline,init=None,lims=None, fit_offset="y"):
# this function returns the input arrays for the baseline coefficients
# only those coefficients that are used are set to be jump parameters,
# all others are set == 0 value, 0 stepsize, [0,0] Boundaries.
Expand Down Expand Up @@ -30,7 +30,7 @@ def basecoeff(ibase,spline,init=None,lims=None):
nbc = nbc+1
else:
offset[:,0]=[init["off"],0.1*np.diff(lims["off"])[0],*lims["off"]] # no CNM: set the starting value and limits of the offset
if spline.use: offset[:,0]=[init["off"],0,0,0] # if we use a spline, set offset to 1 and fix it
if spline.use or fit_offset=="n": offset[:,0]=[init["off"],0,0,0] # if we use a spline, fix offset to 1 or bestvalue from get_decorr fit
else: nbc = nbc+1

# dcol0 coeff: A0*dcol0 + B0*dcol0^2 + C0*dcol0^3 + D0*dcol0^4
Expand Down Expand Up @@ -113,11 +113,11 @@ def basecoeff(ibase,spline,init=None,lims=None):

# dsin coeff: Amp*sin(2pi(dcol0-phi)/P) -x-> Amp*sin(freq*dcol0+phi)
dsin=np.zeros((4,3), dtype=float)
if ibase[7] > 0:
dsin[:,0]=[init["amp"],0.001,0,1]
dsin[:,1]=[init["freq"],0.001,1,333]
dsin[:,2]=[init["phi"],0.001,0,1]
nbc = nbc+3
# if ibase[7]=="y":
# dsin[:,0]=[init["amp"],0.001,0,1]
# dsin[:,1]=[init["freq"],0.001,1,333]
# dsin[:,2]=[init["phi"],0.001,0,1]
# nbc = nbc+3

# H coeff => CNM
dCNM=np.zeros((4,2), dtype=float)
Expand Down
424 changes: 330 additions & 94 deletions CONAN3/conf.py

Large diffs are not rendered by default.

Empty file modified CONAN3/euler_fit_script.py
100644 → 100755
Empty file.
964 changes: 595 additions & 369 deletions CONAN3/fit_data.py

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions CONAN3/funcs.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import scipy.stats as stats
import scipy.interpolate as si


def corfac(rarr, tarr, earr, indlist, nphot, njumpphot):
bw=np.ones(nphot)
br=np.ones(nphot)
Expand Down Expand Up @@ -134,7 +133,7 @@ def credregionML(posterior=None, percentile=0.6827, pdf=None, xpdf=None):
density for a given percentile of the highest posterior density.
These outputs can be used to easily compute the HPD credible regions.
Parameters
Parameters:
----------
posterior: 1D float ndarray
A posterior distribution.
Expand Down Expand Up @@ -240,4 +239,4 @@ def grtest_emcee(chains_out):
VV = (ns-1.)/ns * WV + (nc + 1.)/(ns*nc) * BV # VV should be an (ndim) array
GR = VV/WV # GR should be an (ndim) array

return GR
return GR
Loading

0 comments on commit 8b8ab2a

Please sign in to comment.