8000 fix requivfrac units by kecnry · Pull Request #894 · phoebe-project/phoebe2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix requivfrac units #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

kecnry
Copy link
Member
@kecnry kecnry commented Jun 11, 2024

This PR fixes the units on the optional requivfrac parameter to be unitless.

Fixes #690 (I could not reproduce the actual distributions problem anymore and I think that was fixed in 2.4.4 - but the unit issue remained and is fixed here). The following code now works:

import phoebe

b = phoebe.default_binary()

b.add_constraint('requivfrac', component='primary')
b.add_constraint('requivfrac', component='secondary')
b.flip_constraint('requivfrac@primary', solve_for='requiv@primary')
b.flip_constraint('requivfrac@secondary', solve_for='requiv@secondary')

b.add_distribution({'teffratio': phoebe.gaussian_around(10),
                    'requivfrac@primary': phoebe.gaussian_around(0.1),
                    'incl@binary': phoebe.gaussian_around(0.1),
                    'q': phoebe.gaussian_around(0.1),
                    'asini@binary': phoebe.gaussian_around(1),
                    'teff@primary': phoebe.gaussian_around(100),
                    'requivfrac@secondary': phoebe.gaussian_around(0.1),
                    't0_supconj': phoebe.gaussian_around(1)},
                  distribution='test_dist')
b.uncertainties_from_distribution_collection(distribution='test_dist', parameters=['requiv@secondary'], sigma=3, tex=True)
image

@kecnry kecnry requested a review from aprsa June 11, 2024 13:27
@kecnry kecnry changed the base branch from master to bugfix-2.4.15 June 11, 2024 13:57
@kecnry kecnry merged commit 091ec71 into phoebe-project:bugfix-2.4.15 Jun 21, 2024
15 checks passed
@kecnry kecnry deleted the bugfix-requivfrac-units branch June 21, 2024 11:35
@kecnry kecnry mentioned this pull request Oct 3, 2024
kecnry added a commit that referenced this pull request Oct 3, 2024
* Fix handling of include_times for RVs with compute_times/phases. [#889]
* GPs on models computed in phase-space will be properly computed based on residuals in time space. [#899]
* Fix units of requivfrac. [#894]
* Fix adopting mask_phases from lc_geometry. [#896]
* Fix population of wavelength array in load function for passbands. [#914]
* Temporarily cap numpy dependency < 2.0. [#930]
* Fix installation of phoebe-server CLI script to launch from UI. [#929]
* Fix passing compute to export_solver with features attached. [#922]
* sigmas_lnf: change handling of noise-nuissance parameter for RVs to no longer depend on the RV amplitude. [#901]
* Remove duplicated phoebe-server code. [#940]
* Fix python 3.12+ support by updating invalid escape sequences. [#948]
* Improved precision in calculation of constraints. [#945]

---------

Co-authored-by: Kelly Hambleton (Prsa) <kmhambleton@gmail.com>
Co-authored-by: David Jones <Raindogjones@users.noreply.github.com>
Co-authored-by: Andrej Prsa <aprsa@villanova.edu>
Co-authored-by: Matthias Fabry <matthias.fabry@villanova.edu>
Co-authored-by: Matthias Fabry <matthias.fabry@kuleuven.be>
Co-authored-by: Miroslav Broz <miroslav.broz@email.cz>
aprsa added a commit that referenced this pull request Oct 8, 2024
commit 34281b8
Merge: 1584f6c 22fa0db
Author: Kyle Conroy <kyleconroy@gmail.com>
Date:   Mon Oct 7 15:16:16 2024 -0400

    Merge 2.4.15 into release-2.5

commit 22fa0db
Author: Kyle Conroy <kyleconroy@gmail.com>
Date:   Mon Oct 7 11:20:56 2024 -0400

    modified publish workflow (#952)

    * modified publish workflow using same as https://github.com/aprsa/ndpolator/blob/main/.github/workflows/on_release.yaml
    * address build wheel warnings
    * bump ubuntu runner to 24.04
    * upgrade cibuildwheel
    * skip failing builds

commit fbde243
Author: Kyle Conroy <kyleconroy@gmail.com>
Date:   Thu Oct 3 15:48:13 2024 -0400

    2.4.15 bugfix release (#907)

    * Fix handling of include_times for RVs with compute_times/phases. [#889]
    * GPs on models computed in phase-space will be properly computed based on residuals in time space. [#899]
    * Fix units of requivfrac. [#894]
    * Fix adopting mask_phases from lc_geometry. [#896]
    * Fix population of wavelength array in load function for passbands. [#914]
    * Temporarily cap numpy dependency < 2.0. [#930]
    * Fix installation of phoebe-server CLI script to launch from UI. [#929]
    * Fix passing compute to export_solver with features attached. [#922]
    * sigmas_lnf: change handling of noise-nuissance parameter for RVs to no longer depend on the RV amplitude. [#901]
    * Remove duplicated phoebe-server code. [#940]
    * Fix python 3.12+ support by updating invalid escape sequences. [#948]
    * Improved precision in calculation of constraints. [#945]

    ---------

    Co-authored-by: Kelly Hambleton (Prsa) <kmhambleton@gmail.com>
    Co-authored-by: David Jones <Raindogjones@users.noreply.github.com>
    Co-authored-by: Andrej Prsa <aprsa@villanova.edu>
    Co-authored-by: Matthias Fabry <matthias.fabry@villanova.edu>
    Co-authored-by: Matthias Fabry <matthias.fabry@kuleuven.be>
    Co-authored-by: Miroslav Broz <miroslav.broz@email.cz>

commit bf850e1
Author: Kyle Conroy <kyleconroy@gmail.com>
Date:   Thu Oct 3 11:02:38 2024 -0400

    release GH actions workflow (#949)
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.

uncertainties_from_distribution_collection() UnitConversionError for requiv
2 participants
0