Giter Club home page Giter Club logo

allesfitter's People

Contributors

dfm avatar martindevora avatar mnguenther avatar tdaylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

allesfitter's Issues

Typo in ttvs plot

I'm finding that "Tranist Nr." instead of "Transit Nr." appears as X label in the ttv results report. Please correct this whenever you find it suitable.
ttv_results_SOI_1.pdf

Regards and thanks again.

Error generating ns_output

Hi, the generation of the ns_output crashes when creating an image. Hence, no single_transits_plot, no corner_plot, neither ns_table or ns_derived_table files are generated. It happened after fitting many TESS sectors together (thus many transits). This is the stack:

Image size of 600x129200 pixels is too large. It must be less than 2^16 in each direction.
Traceback (most recent call last):
  File "/home/mdevora/.local/lib/python3.8/site-packages/sherlockpipe/fit.py", line 94, in fit
    allesfitter.ns_output(allesfit_dir)
  File "/usr/local/lib/python3.8/site-packages/allesfitter/nested_sampling_output.py", line 133, in ns_output
    fig.savefig( os.path.join(config.BASEMENT.outdir,'ns_fit_per_transit_'+inst+'_'+companion+'.pdf'), bbox_inches='tight' )
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/figure.py", line 2311, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/backend_bases.py", line 2193, in print_figure
    self.figure.draw(renderer)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/figure.py", line 1863, in draw
    mimage._draw_list_compositing_images(
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 411, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/axes/_base.py", line 2747, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/artist.py", line 37, in draw_wrapper
    renderer.start_rasterizing()
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/backends/backend_mixed.py", line 88, in start_rasterizing
    self._raster_renderer = self._raster_renderer_class(
  File "/usr/local/lib64/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 96, in __init__
    self._renderer = _RendererAgg(int(width), int(height), dpi)
ValueError: Image size of 600x129200 pixels is too large. It must be less than 2^16 in each direction.
Generating custom plots

Regards.

GUI (Jupyter-notebook) in server

Hello.
I just started to use allesfitter.

I runs jupyter-notebook in our server and open the notebook in my laptop's browser.
When I run the GUI.ipynb in server and open it in my laptop's browser, I couldn't select directory because tk() needs browser in the server.
Although I installed a browser in server, the directory-GUI was sent via X-window system. This is very slow.
Do you have any ideas to solve this?

Small bug creating keys for baseline offsets (RV)

Was trying to set RV offsets for an instrument and kept getting a key error, the key being created was using 'flux' instead of 'rv' in the string. Here's the error message:
Screen Shot 2022-03-13 at 5 24 35 PM
Did some poking around, looks like in lines 284, 288, and 289 of the 3rd section of Parameters, the string being created was defaulting to using 'flux' instead of looking at the key ('flux' or 'rv'). Here's what they looked like originally:
Screen Shot 2022-03-13 at 10 28 07 PM
It was an easy fix, I switched it to match the formatting of the above parameters and it works fine for me now. Here's what it looked like when I got it working:
Screen Shot 2022-03-13 at 10 29 29 PM
Not sure if this is just something I've experienced or if this is a wider issue, just letting you know!

allesclass.data shows rv_err as nans

Hi,

I'm trying to model an RV system and it's not working, and I noticed that when I do alles = allesfitter.allesclass('./') and alles.data, the rv_err appears as nans, but my rv file is OK... Do you have any idea of why this happens??

Thanks

[bug] error in GUI

Thank you for this amazing package. I ran allesitter to do transit fitting in the past and it worked fine. Now I ran with phase curve fitting using the most updated version in github but I encountered a bug i.e. "missing key ln_yerr_median" in part 6.6 "tighter priors on errors and baseline" in GUI that does not allow me proceed to the last part. Do you need more details to debug this problem?

image

TTVs preparation plots with gaps

Hi,

when running the allesfitter ttvs module for curves with long gaps (like TESS ones for very separated sectors) the plots of the transits within the curve are very complicated to be assessed: less x-axis values and huge long horizontal monolithic plot. I don't know what can of improvements you could do (maybe splitting the document with n plots -one per dataset without gaps-), but just noticed that it is complicated to be read. I attach an example.
ttv_preparation_SOI_2

Regards.

inf evidence does not reach precribed ns_tol

I re-ran my old params+settings file (without any changes) using the latest allesfitter version but this time, the NS sampling does not converge at all.

The initial plots were produced look fine but I notice the logz value is always inf which is probably the reason why the sampling takes too long even if I use ns_tol=1 or so:

1249it [03:18,  3.17s/it, batch: 0 | bound: 1 | nc: 1355 | ncall: 125404 | eff(%):  0.992 | loglstar:   -inf <   -inf <    inf | logz:   -inf +/-    nan | dlogz:    inf >  1.000]

Can you prescribe a way to avoid inf evidence?

Select final ns_fit x axis limit of phase & T - T0 plots

I would like to know whether we can select the x_lims of the phase and T - T0 plots of the final ns_fit pdf. For instance, we run a fit where we have selected a 'fast_fit_width=0.15'. The plots are however plotting the entire phase and -4 to 4 hours in the T-T0 plot. Image provided as an example:

image

We would like to stretch both plots to the size of our data somehow. Is this possible through the usage of some config params? For instance, given that we can use the fast_fit_width I'd expect some way to focus on the proper range in both plots.

Kind regards and thank you in advance.

Bug in the GUI when using sample_GP_Matern32

Bug in the GUI when using the sample_GP_Matern32 as the baseline: when I'm entering my baseline guess in the Advanced params table and then confirming by creating the params.csv file, the baseline gp Matern32 Insigma and the baseline gp Mater32 Inrho are not writing automatically in the params.csv file.

[Question] ns_output errors calculated from median

Hi,

I observed that the final uncertainties provided by Allesfitter are the values from the median of the normal distributions. Is this the standard approach for all the bayesian models? I was observing the typical corner plots and the allesfitter.ns_output function and thought that we are leaving half the probabilities out of the uncertainty by using the median.

I don't want to ask for a change in allesfitter to use another different percentile, but would it be dumb to ask for a parameter in allesfitter.ns_output where we could select the percentile to be used for the errors? I ran out into a case where a ground observation campaign was completely missing the target real ephemerides because the propagated error was unproperly estimated based on the allesfitter results uncertainties and thought that it might be something to be improved. Of course I could just use two or three times the allesfitter uncertainties values, but I'd like better to stick to some statistical threshold given by a higher percentile than the median.

Again, thank you very much for your help. Hope everything goes fine in the ESA : P

Kind regards.

Wotan not really optional

Hi,

I was trying to run allesfitter without wotan installed and it wouldn't run as it wouldn't import flatten in time_series and thus fail in lightcurves when trying to import flatten.

Cheers

Allesfitter stops after cryptic error

Hi,

I'm running allesfitter on a set of rvs and photometry, the rvs have a lot of noise from stellar activity which cannot be modeled with a single GP, so I'm trying my luck fitting 3 planets, thing is eventually, with both nested sampling and MCMC there comes a point where allesfitter says function eanom failed to converge 6.2506241095242920 0.99989602064794081 1.7918474379209218E+069 8.6196351880484955E+068 9.2988391911607227E+068 and then apparently stops. Have you encountered this before? Is it actually crashing or should I be more patient?

Thank you!

Import fails in Python 3.9

I installed allesfitter in a new python 3.9 environment and got the traceback below when I tried to import it. Installing in a python 3.8 environment instead fixed the issue.

In [1]: import allesfitter
Traceback (most recent call last):

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-1-006995d2ab9b>", line 1, in <module>
    import allesfitter

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/__init__.py", line 45, in <module>
    from .mcmc import mcmc_fit

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/mcmc.py", line 37, in <module>
    from .computer import update_params, calculate_lnlike_total

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/computer.py", line 47, in <module>
    from .lightcurves import translate_limb_darkening_from_q_to_u as q_to_u

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/lightcurves.py", line 39, in <module>
    from .plotting import tessplot

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/plotting.py", line 36, in <module>
    from allesfitter.io import read_csv

  File "/Users/mattcraig/miniconda3/envs/alles/lib/python3.9/site-packages/allesfitter/io.py", line 62
    X = np.column_stack((*arrays))
                         ^
SyntaxError: can't use starred expression here

Question: how to parameterize polynomial baseline functions?

I searched but couldn't find in examples and documentation a params.csv file that uses hybrid_poly_2 (and higher order ones) baseline function. I tried to generate the params.csv file using the GUI but when, for example, hybrid_poly_2 is selected, no relevant parameter appears in the generated params.csv. Actually, why no parameter is specified in params.csv when using any hybrid_* baseline functions?

Anyway, I proceeded to run allesfitter.show_initial_guess but it appears from the resulting plots that the baseline function is constant despite changing the order of hybrid_poly_* baseline function in the settings.csv file. hybrid_spline however works fine.

Make the GUI more intuitive for flare fitting

The GUI should not show any planet parameter fields, nor print any keywords like "phase_curve" etc. into the settings file. Also make sure that "do_not_phase_fold" is printed and set to True. Ideally, merge this issue with the major rehaul of all other fitting- and plotting-related keywords.

[Warning]: You are using outdated keywords.

I got this warning.
What should I do?

Estimating errors and baselines... this will take a couple of minutes. Please be patient, you will get notified once everything is completed.



allesfitter version
--------------------------

v1.1.1

Shifting epochs into the data center:
--------------------------

Companion b
	input epoch: 2458931.25

###############################################################################
M1 flux
###############################################################################

Starting...
You are using outdated keywords. Automatically renaming log_err_flux_M1 ---> ln_err_flux_M1. Please fix this before the Duolingo owl comes to get you.
elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  0%|          | 3/1000 [00:00<00:42, 23.51it/s]

incorporate input covariates in transit model

Is it possible to incorporate additional input covariates e.g. centroid offset, airmass, etc for joint systematics+transit modeling? I have ground-based light curves that have strong in-transit trend that can be explained by telescope pointing offset. Although using e.g. Matern 32 baseline model will fit the trend, it seems reasonable to use physically-motivated covariates to properly take into account the systematics. Is this added complexity necessary at all?

Double Lined (SB2) Binaries in Allesfitter

Is there a way to fit double lined binaries within allesfitter, and if so what extra parameters/settings are needed to do this - apologies if this is in the documentation, but I couldn't find anything.

Issue with 01 tutorial

Hey Max! I hope you are well. I'm checking out allesfitter (very nice btw) and I get an error when running the first tutorial. Have you seen this before? Let m know if you need more info. Below is a dump of the output and traceback.

I simply ran the run.py file using the files from the git repo. Cheers, James

allesfitter version
---------------------
v1.2.8

Shifting epochs into the data center
------------------------------------
Companion b
        input epoch: 1.09
        shifted epoch: 4.5
        shifted by 1 periods
Nested Sampling output files already exists in allesfit/results
---------------------------------------------------------------
What do you want to do?
1 : overwrite the output files
2 : abort
1


Plotting collage for companion b...
100%|█████████████████████████████████████████████| 9/9 [00:00<00:00, 50.29it/s]
Plotting individual transits for companion b and instrument Leonardo...
100%|█████████████████████████████████████████████| 3/3 [00:00<00:00, 14.83it/s]

Results:
----------
log(Z) = 450.0570070110617 +- 0.13039549733445518
Nr. of posterior samples: 20532
Traceback (most recent call last):
  File "run.py", line 23, in <module>
    allesfitter.ns_output('allesfit')
  File "/Users/jmcc/.pyenv/versions/miniconda3-latest/lib/python3.7/site-packages/allesfitter/nested_sampling_output.py", line 158, in ns_output
    results2 = results.copy()                    
AttributeError: 'Results' object has no attribute 'copy'
>>> results
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'results' is not defined

Overlapping x-axis values labels in ttvs plots

Hi,
I'm noticing that in the ttvs preparation stage the plots are overlapping the time values when they are long sometimes. See example in picture.
image

Also, when we get the initial guess for the ttvs run, its plots are also overlapping:
image

And finally for the final ns_fit plots, the same happening:
image

I'd be great if the size of the font of the x-axis grid values was reduced so they don't overlap.

Kind regards.

Tutorial failure with MCMC instead of nested sampling

I tried running the tutorial 1b with the run.py below:

import allesfitter



allesfitter.show_initial_guess('.')
allesfitter.mcmc_fit('.')
allesfitter.mcmc_output('.')

When I do that I rapidly get an error raised by emcee:

TypeError                                 Traceback (most recent call last)
~/Dropbox/MSUM/Research/allesfitter/tutorials/01B/mcmc_version/run_mc.py in <module>
     22 
     23 allesfitter.show_initial_guess('.')
---> 24 allesfitter.mcmc_fit('.')
     25 allesfitter.mcmc_output('.')

~/miniconda3/envs/alles/lib/python3.8/site-packages/allesfitter/mcmc.py in mcmc_fit(datadir)
    205                                             pool=pool,
    206                                             backend=backend)
--> 207             sampler = run_mcmc(sampler)
    208         t1 = timer()
    209         timemcmc = (t1-t0)

~/miniconda3/envs/alles/lib/python3.8/site-packages/allesfitter/mcmc.py in run_mcmc(sampler)
    183         #::: run the sampler
    184         logprint("\nRunning full MCMC")
--> 185         sampler.run_mcmc(p0,
    186                          (config.BASEMENT.settings['mcmc_total_steps'] - already_completed_steps)/config.BASEMENT.settings['mcmc_thin_by'],
    187                          thin_by=config.BASEMENT.settings['mcmc_thin_by'],

~/miniconda3/envs/alles/lib/python3.8/site-packages/emcee/ensemble.py in run_mcmc(self, initial_state, nsteps, **kwargs)
    441 
    442         results = None
--> 443         for results in self.sample(initial_state, iterations=nsteps, **kwargs):
    444             pass
    445 

~/miniconda3/envs/alles/lib/python3.8/site-packages/emcee/ensemble.py in sample(self, initial_state, log_prob0, rstate0, blobs0, iterations, tune, skip_initial_state_check, thin_by, thin, store, progress, progress_kwargs)
    394         with get_progress_bar(progress, total, **progress_kwargs) as pbar:
    395             i = 0
--> 396             for _ in count() if iterations is None else range(iterations):
    397                 for _ in range(yield_step):
    398                     # Choose a random move

A full list of the packages in my environment is below:

allesfitter               1.2.4                    pypi_0    pypi
anyio                     3.3.0            py38h50d1736_0    conda-forge
appnope                   0.1.2            py38h50d1736_1    conda-forge
argon2-cffi               20.1.0           py38h96a0964_2    conda-forge
arviz                     0.11.2             pyhd8ed1ab_1    conda-forge
astropy                   4.3.1            py38hbe852b5_1    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py38h96a0964_1001    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.17.2               h0d85af4_0    conda-forge
ca-certificates           2021.5.30            h033912b_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
celerite                  0.4.0            py38he9f00de_1    conda-forge
certifi                   2021.5.30        py38h50d1736_0    conda-forge
cffi                      1.14.6           py38h1a44b6c_1    conda-forge
cftime                    1.5.0            py38h0793694_0    conda-forge
chardet                   4.0.0            py38h50d1736_1    conda-forge
charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
corner                    2.2.1              pyhd8ed1ab_0    conda-forge
cryptography              3.4.7            py38h1fa4640_0    conda-forge
curl                      7.79.0               hb861fe1_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
debugpy                   1.4.1            py38ha048514_0    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
dynesty                   1.1                pyh44b312d_0    conda-forge
ellc                      1.8.5            py38hdbaa049_0    conda-forge
emcee                     3.1.1              pyh8a188c0_0    conda-forge
entrypoints               0.3             py38h32f6830_1002    conda-forge
freetype                  2.10.4               h4cff582_1    conda-forge
h5py                      3.4.0           nompi_py38h9f21798_101    conda-forge
hdf4                      4.2.15               hefd3b78_3    conda-forge
hdf5                      1.12.1          nompi_h2f0ef1a_100    conda-forge
idna                      3.2                pyhd3eb1b0_0
importlib-metadata        4.8.1            py38h50d1736_0    conda-forge
importlib_metadata        4.8.1                hd8ed1ab_0    conda-forge
ipykernel                 6.4.1            py38h5fd9f69_0    conda-forge
ipython                   7.27.0           py38h5fd9f69_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h0d85af4_2003    conda-forge
jedi                      0.18.0           py38h50d1736_2    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   hbcb3906_0    conda-forge
json5                     0.9.6              pyhd3eb1b0_0
jsonschema                3.2.0            py38h32f6830_1    conda-forge
jupyter_client            7.0.3              pyhd8ed1ab_0    conda-forge
jupyter_core              4.8.1            py38h50d1736_0    conda-forge
jupyter_server            1.11.0             pyhd8ed1ab_0    conda-forge
jupyterlab                3.1.12             pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.8.1              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
kiwisolver                1.3.2            py38h12bbefe_0    conda-forge
krb5                      1.19.2               hcfbf3a7_0    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
lerc                      2.2.1                h046ec9c_0    conda-forge
libblas                   3.9.0           11_osx64_openblas    conda-forge
libcblas                  3.9.0           11_osx64_openblas    conda-forge
libcurl                   7.79.0               hf45b732_0    conda-forge
libcxx                    12.0.1               habf9029_0    conda-forge
libdeflate                1.7                  h35c211d_5    conda-forge
libedit                   3.1.20210714         h9ed2024_0
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                he49afe7_1    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
liblapack                 3.9.0           11_osx64_openblas    conda-forge
libnetcdf                 4.8.1           nompi_h6609ca0_101    conda-forge
libnghttp2                1.43.0               h07e645a_0    conda-forge
libopenblas               0.3.17          openmp_h3351f45_1    conda-forge
libpng                    1.6.37               h7cec526_2    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libssh2                   1.10.0               h52ee1ee_0    conda-forge
libtiff                   4.3.0                h1167814_1    conda-forge
libwebp-base              1.2.1                h0d85af4_0    conda-forge
libzip                    1.8.0                h8b0c345_0    conda-forge
llvm-openmp               12.0.1               hda6cdc1_1    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
markupsafe                2.0.1            py38h96a0964_0    conda-forge
matplotlib                3.4.3            py38h50d1736_0    conda-forge
matplotlib-base           3.4.3            py38hc7d2367_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py38h96a0964_1004    conda-forge
mpi                       1.0                       mpich    conda-forge
mpi4py                    3.1.1            py38hcd6a4d3_0    conda-forge
mpich                     3.4.2              hd33e60e_100    conda-forge
nbclassic                 0.3.2              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 6.1.0            py38h50d1736_1    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
netcdf4                   1.5.7           nompi_py38h465ef27_102    conda-forge
notebook                  6.4.4              pyha770c72_0    conda-forge
numpy                     1.21.2           py38h49b9922_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                h6e7aa92_1    conda-forge
openssl                   1.1.1l               h0d85af4_0    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandas                    1.3.3            py38ha53d530_0    conda-forge
pandoc                    2.14.2               h0d85af4_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pexpect                   4.8.0            py38h32f6830_1    conda-forge
pickleshare               0.7.5           py38h32f6830_1002    conda-forge
pillow                    8.3.2            py38hee640a0_0    conda-forge
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.20             pyha770c72_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyerfa                    2.0.0            py38h0793694_0    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyrsistent                0.17.3           py38h96a0964_2    conda-forge
pysocks                   1.7.1            py38h50d1736_3    conda-forge
python                    3.8.12          h17280f6_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pyzmq                     22.3.0           py38hd3b92b6_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
rebound                   3.17.3           py38h96a0964_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
requests-unixsocket       0.2.0                      py_0    conda-forge
schwimmbad                0.3.2            py38h50d1736_0    conda-forge
scikit-learn              0.24.2           py38h1021539_1    conda-forge
scipy                     1.7.1            py38hd329d04_0    conda-forge
seaborn                   0.11.2               hd8ed1ab_0    conda-forge
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                58.0.4           py38h50d1736_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0            py38h50d1736_1    conda-forge
sqlite                    3.36.0               h23a322b_1    conda-forge
statsmodels               0.12.2           py38hbe852b5_0    conda-forge
terminado                 0.12.1           py38h50d1736_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.2.0              pyh8a188c0_0    conda-forge
tk                        8.6.11               h5dbffcc_1    conda-forge
tornado                   6.1              py38h96a0964_1    conda-forge
tqdm                      4.62.2             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
typing_extensions         3.10.0.2           pyh06a4308_0
urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.58.0           py38hecd8cb5_4
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
widgetsnbextension        3.5.1            py38h50d1736_4    conda-forge
xarray                    0.19.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h7795811_1010    conda-forge
zstd                      1.5.0                h582d3a0_0    conda-forge

Improve documentation

  • bring the GUI and all tutorials up-to-date with newer syntax (e.g. "ln" instead of "log")
  • add documentation for the residual diagnostic tests
  • add new tutorials for new features like handling time series, lightcurves, transit search, and injection-recovery tests
  • add YouTube videos for all tutorials

(Edited)

Make params.csv and settings.csv more luser proof

If there are any rows that are not recognized (e.g., because of spelling mistakes, missing the _[inst] decoration, or having superfluous _[inst] decorations) in params.csv and settings.csv, the user should be alerted.

Feature idea: change fast_fit options

Instead of fast_fit=True/False and keys like secondary_eclipse and phase_curve, combine all options into one.
Deprecate the old keys, and implement the new key
fit_type
with options

  • transit: fit only the transit and mask out the rest (currently done by fast_fit=True)
  • primary_eclipse: same as transit
  • transit_and_occultation: fit the transit and occultation and mask out the rest (currently done by combining fast_fit=True and secondary_eclipse=True)
  • primary_and_secondary_eclipse: same as transit_and_occultation
  • full_lightcurve: fit the full lightcurve (currently done by fast_fit=False)
  • phase_curve: like full_lightcurve but with the extra phase curve plots and calculations (could be redundant; could instead simply check if the user uses phase_curve related parameters)

[Bug] Missing last companion Total Transit Duration

Hi,
I was able to generate the results directory for a 5-candidates system. I found out a very weird system, which might probably point to False candidates. I wanted to do some checks in the derived data when I realised that the last companion was missing the Total and Full Transit Duration from the ns_derived_table files (latex tables and csv file). I'm attaching the entire allesfitter working directory for you to be able to debug the case.

The link to the allesfitter dir (the file is too large to be attached here): https://drive.google.com/file/d/1AQO_MTCutPOQjlfOHgqfFMYrdeElv0O0/view?usp=sharing

I'm running allesfitter 1.2.2.

Regards.

Feature idea: post-processing comparative histograms

from allesfitter import allesclass
alles_old = allesclass(datadir_old)
alles_new = allesclass(datadir_new)
plt.hist(alles_old.posterior_params[‘b_rr’])
plt.hist(alles_new.posterior_params[‘b_rr’])
etc.
automatically for all possible fitted parameters.

copious maplotlib warnings

I know that it is fine to ignore these warnings but wanted to make you aware of them. At the step of generating output warnings like this are raised (allesfitter version 1.2.4, matplotlib version 3.4.3):

! WARNING:
 color is redundantly defined by the 'color' keyword argument and the fmt string "k-" (-> color='k'). The keyword argument will take precedence.
type: <class 'UserWarning'>, file: /Users/mattcraig/miniconda3/envs/alles/lib/python3.8/site-packages/allesfitter/general_output.py, line: 811

Compatibility with the new Python 3.8

TLDR: If you use Python 3.8, update all your packages and use allesfitter version > 1.2.

There have been some issues reported with the "experimental" Python 3.8 releases in the past, but now that the "stable" Python 3.8 seems to be officially supported by Anaconda, we can revisit it.
Until then, if you encounter any issues with Python 3.8, please set up a fresh Python 3.7 environment for allesfitter.

Transit duration as input

Hi. I'm beginning to use allesfitter for transit fitting. I was wondering why there is no input parameter for the transit duration. Would you please help me with this? I'm using the light curve where I previously found a possible transit candidate with X duration, but a nested sampling run is returning very big uncertainties and the transit duration expands from X to 2*X (the light curve shows a little bit of variability before the transit). I would like to know how could I tell allesfitter that I know an estimation of the duration so the model can adjust better to it.

I'm sorry if I'm misunderstanding something but I'm very new with transit modeling.
Kind regards.

[Error] NS_output not generated

Hello,
I launched a fit for 3 planets. It seemed to run fine, even though it took 14 hours : ) The problem appeared when calling allesfitter.ns_output. This is the stack I found:

Filling the Basement


allesfitter version
---------------------
v1.2.2

Shifting epochs into the data center
------------------------------------
Companion SOI_1
	input epoch: 1691.0105488696813
	shifted epoch: 1810.854818157887
	shifted by 11 periods
Companion SOI_2
	input epoch: 1689.975239903956
	shifted epoch: 1802.7797961014235
	shifted by 6 periods
Companion SOI_3
	input epoch: 1693.4444089962353
	shifted epoch: 1814.7627571365817
	shifted by 9 periods
100%|██████████| 235/235 [11:53<00:00,  3.04s/it]
100%|██████████| 235/235 [11:51<00:00,  3.03s/it]
100%|██████████| 235/235 [12:04<00:00,  3.08s/it]
Traceback (most recent call last):
  File "/home/martin/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/201.7846.77/plugins/python/helpers/pydev/pydevd.py", line 1438, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/home/martin/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/201.7846.77/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/martin/git_repositories/sherlockpipe/test.py", line 12, in <module>
    allesfitter.ns_output("/mnt/0242522242521AAD/dev/workspaces/git_repositories/sherlockpipe/run_tests/analysis/dietrich/TIC467179528_all/fit_0")
  File "/home/martin/.local/lib/python3.8/site-packages/allesfitter/nested_sampling_output.py", line 132, in ns_output
    fig, axes = afplot_per_transit(posterior_samples_for_plot, inst, companion)
  File "/home/martin/.local/lib/python3.8/site-packages/allesfitter/general_output.py", line 794, in afplot_per_transit
    xx = np.arange(x[ind][0], x[ind][-1]+dt, dt)
IndexError: index 0 is out of bounds for axis 0 with size 0

Process finished with exit code 1

Running allesfitter 1.2.2 version with Python 3.8.

Results: Only the PDFs appear in the results folder together to the log files, which are not showing the exception. I'm attaching my working allesfitter folder so you can try debugging this.
Expected: I'm missing the rest of files with the fit data, like the ns_table and ns_derived_table CSVs.

fit_0.zip

Can you tell whether it is a coding bug or I did something wrong with the settings or params files?

Kind regards,
Martín.

plot_MCMC_corner() breaks in 1D

I'm fitting an RV data set with only one variable, K. In mcmc_output.py lines 203-205, the code breaks with error:

AttributeError: 'numpy.ndarray' object has no attribute 'set_title'

To fix it, I changed lines 203-205 to:

caxes[i,i].set_title(ctitle)
caxes[i,i].xaxis.set_label_coords(0.5, -0.5)
caxes[i,i].yaxis.set_label_coords(-0.5, 0.5)

This now works and I just wanted to let you know about it.

UltraNest support

Would you be interested to add support for https://johannesbuchner.github.io/UltraNest/ ?
The interface should be very similar to dynesty.

UltraNest is a very reliable tuning-parameter-free algorithm. I have published some examples where the UltraNest algorithm is unbiased while multinest's algorithm (implemented in pymultinest,nestle,dynesty) gives a different answer. UltraNest is a pure-python package and very easy to install with pip or conda.

UltraNest also supports resuming from disk and MPI parallelisation, if that is useful to you. It can be faster than dynesty, especially if you take advantage of vectorization.

Weird depth and rr fit values vs params_star

Hi. First of all I don't want to state this issue as a bug before gathering info from you. Let me expose what I'm trying:
I'm running allesfitter with:
allesfitter.ns_fit(allesfit_dir) allesfitter.ns_output(allesfit_dir)

I'm providing settings.csv, params.csv with this content:

#companion b astrophysical params,,,,,
SOI_5_rr,0.026,1,trunc_normal 0 1 0.026 0.05,$R_b / R_\star$,
SOI_5_rsuma,0.11011430055938672,1,trunc_normal 0 1 0.11011430055938672 0.1,$(R_\star + R_b) / a_b$,
SOI_5_cosi,0.0,1,uniform 0.0 0.06,$\cos{i_b}$,
SOI_5_epoch,1362.8847530987089,1,trunc_normal -1000000000000.0 1000000000000.0 1362.8847530987089 0.05,$T_{0;b}$,$\mathrm{BJD}$
SOI_5_period,13.189658223908912,1,trunc_normal -1000000000000.0 1000000000000.0 13.189658223908912 0.05,$P_b$,$\mathrm{d}$
SOI_5_f_c,0.0,0,trunc_normal -1 1 0.0 0.0,$\sqrt{e_b} \cos{\omega_b}$,
SOI_5_f_s,0.0,0,trunc_normal -1 1 0.0 0.0,$\sqrt{e_b} \sin{\omega_b}$,

#dilution per instrument,,,,,
dil_lc,0.0,0,trunc_normal 0 1 0.0 0.0,$D_\mathrm{0; lc}$,
#limb darkening coefficients per instrument,,,,,
host_ldc_q1_lc,0.1998,0,uniform 0.0 1.0,$q_{1; \mathrm{lc}}$,
host_ldc_q2_lc,0.5387,0,uniform 0.0 1.0,$q_{2; \mathrm{lc}}$,
#surface brightness per instrument and companion,,,,,
SOI_5_sbratio_lc,0.0,0,trunc_normal 0 1 0.0 0.0,$J_{b; \mathrm{lc}}$,
#albedo per instrument and companion,,,,,
host_geom_albedo_lc,0.0,0,trunc_normal 0 1 0.0 0.0,$A_{\mathrm{geom}; host; \mathrm{lc}}$,
SOI_5_geom_albedo_lc,0.0,0,trunc_normal 0 1 0.0 0.0,$A_{\mathrm{geom}; b; \mathrm{lc}}$,
#gravity darkening per instrument and companion,,,,,
host_gdc_lc,0.0,0,trunc_normal 0 1 0.0 0.0,$Grav. dark._{b; \mathrm{lc}}$,
#spots per instrument and companion,,,,,
#errors per instrument,
ln_err_flux_lc,-7.0,1,uniform -15.0 0.0,$\log{\sigma_\mathrm{lc}}$,$\log{ \mathrm{rel. flux.} }$
#baseline per instrument,
baseline_gp_matern32_lnsigma_flux_lc,0.0,1,uniform -15.0 15.0,$\mathrm{gp: \ln{\sigma} (lc)}$,
baseline_gp_matern32_lnrho_flux_lc,0.0,1,uniform -15.0 15.0,$\mathrm{gp: \ln{\rho} (lc)}$,

As you can see, I'm providing a period of 13.19d and a rr of 0.026.

and params_star.csv with content:

165.691476612015,-16.4061904736575,1.133,0.0645,0.0645,0.992,0.082,0.082,5540.0,220,220,0.1998,0.5387

As you can see, I'm providing a R_star of 1.133 with little uncertainty.

Given these priors, I obtain the next posteriors:

Companion radius SOI_5; $R_\mathrm{SOI_5}$
($\mathrm{R_{\oplus}}$),12.997667627520098,3.6315454554099897,4.360371356068896,derived
SOI_5_rr,0.10548749875981736,0.02878261480797195,0.033790848181602606,$R_b / R_\star$,
Transit depth (dil.) SOI_5; $\delta_\mathrm{tr; dil; SOI_5; lc}$ (ppt),0.0012701552787879322,0.0001110527739457412,0.00011386618070774457,derived

Which seems to be unlikely with the star params I provided because:
With the obtained depth of 1 ppt (0.00127) the R_b/R_star value would be aproximately 0.04 (given sqrt(depth) = R_b/R_star). Am I missing anything? I know I'm not restricting the uncertainties from params.csv but I'd expect that the star parameters that I'm providing as input would act as a hard limit.

Kind regards and again, thank you in advance for your attention.

TTVs transit numbers differ

Hi,
while trying out the TTVs module I realized about something. When I open the ttpvs-per-transit plot of my second candidate, the transit numbering differs to the TTVs initial guess transit numbering. See attached image:
image
You can see that transit 5 data is skipped in the initial_guess plot (right) and then its transit 5 matches the ttv_preparation transit 6. I guess this is somehow related to the transit lacking some data, but the point is that the numbering should be kept. I don't know whether this is also related to the transit fit missing the model at all (I only see the baseline).

In addition, this also would be affecting the final TTVs plot. See next attached image:
image
You can see that the transit 6 ttv from the final fit doesn't match the 6th point in the graph, but the 7th. I'm guessing that the transit numbering is matching the ttvs_preparation stage one instead of the transit numbering from the fit. Hence the mess. If this was the case, I don't know where the transit 5 data was obtained either.

Sorry if it sounds chaotic, but these are only some previous findings I've been getting. For clarity purposes, I'm also attaching my entire allesfitter working dir: https://drive.google.com/file/d/18t--3SnycEIjBxgYkNKr5S8uYiGu1uc9/view?usp=sharing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.