Skip to content
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

Marcosertoli/satakihino #263

Merged
merged 2 commits into from
Jul 17, 2023
Merged

Marcosertoli/satakihino #263

merged 2 commits into from
Jul 17, 2023

Conversation

marcosertoli
Copy link
Contributor

Fixed Bayes workflow

Copy link
Collaborator

@satakihino satakihino left a comment

Choose a reason for hiding this comment

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

Viewed.

@satakihino satakihino merged commit 4dbeddd into satakihino Jul 17, 2023
marcosertoli added a commit that referenced this pull request Jul 31, 2023
* New reader from spectroscopy pre-analysis (currently reading only emissivity and named "spectra")

* Added gaunt factor approximation from Carson 1988

* first commit

* first commit

* second commit, updated background_fit

* added **kwargs to call function

* test

* he_like

* added pi diagnostic

* new changes

* commit

* error with dimensions

* now it works, but the data is not what is wanted to be

* changed impurity from ar to c
changed saving path

* dict

* updated dict, question about model_data in bayes

* now bayes works

* Temporarily stop caching (issues to be solved)

* Copied Bremss bayes opt to new file

* Marcosertoli/satakihino (#263)

* Temporarily stop caching (issues to be solved)

* Copied Bremss bayes opt to new file

---------

Co-authored-by: Marco Sertoli <[email protected]>

* CHanged .sel to .interp for plasma attributes as in other models.

* Ran pre-commit

* Fixed pre-commit errors

* Fixed pre-commit errors

* Reconverted interp to sel.
Made transmission filter a DataArray.
Started moving Aleksandra's spectra filtering to Diode model

* Fixed pre-commit

* Temporarily commented out t-interp case for diode filter (sel instead of interp...)

* st40reader.py passing pre-commit

* Moved background_fit to a method inside the diode filter model and generalised for spectral integration.

* Fixed plotting axes ranges

* Added generalised example that can use phantom data/equilibrium as well as experimental data from SXR cameras and diode filter models/data.

* Added emissivity attribute = local Brems emission integrated over wavelength.
Changed example geometry adding LOS to make inversion possible.

* First stab at file with workflows to calculate Zeff using tomo_1d or Bayesian inference

* Adapted tomo1d examples to run on "pi" bremsstrahlung. Working on phantom and real data.

* Temporary fix to slash channels in spectrometer that are not acquired

* Corrected factor multiplication for zeff calculation from bremsstrahlung

* Initialize variables now easily callable after having instatiated the class

* New example geometry and in standalone method so to be usable also from outside

* Refactored methods to estimate Zeff from bremsstrahlung using inversion or bayesian inference.

* Update bayesmodels.py

adding zeff to saved quantites

* Update bayes_workflow.py

zeff added to plots

* Update example_bayes_opt_brems.py

zeff added to phantom profiles

* Update bayesmodels.py

Zeff -> zeff

* Modified spectrometer reader to select good channels only

* Zeff blob summed over elements

* Zeff blob summed over elements

* Set uncertainty to zero until correctly calculated

* Changed filter limits to nested dictionary to be applicable to diagnostics with multiple quantities

* Corrected minor typo

* Formatting mod to pass pre-commit

* Temporary fix to get abstract reader test to pass.

* Modified workflows to accept both phantoms and experimental data, including fitting of TS.

Four example methods to run at the end of the file.

* Cleaned up so inference works better. Still some inconsistencies between Zeff and Impurity density...

* Refactored to pass pre-commit

* Marcosertoli/reorganize bremss calculation (#267)

* Temporarily stop caching (issues to be solved)

* Copied Bremss bayes opt to new file

* CHanged .sel to .interp for plasma attributes as in other models.

* Ran pre-commit

* Fixed pre-commit errors

* Fixed pre-commit errors

* Reconverted interp to sel.
Made transmission filter a DataArray.
Started moving Aleksandra's spectra filtering to Diode model

* Fixed pre-commit

* Temporarily commented out t-interp case for diode filter (sel instead of interp...)

* st40reader.py passing pre-commit

* Moved background_fit to a method inside the diode filter model and generalised for spectral integration.

* Fixed plotting axes ranges

* Added generalised example that can use phantom data/equilibrium as well as experimental data from SXR cameras and diode filter models/data.

* Added emissivity attribute = local Brems emission integrated over wavelength.
Changed example geometry adding LOS to make inversion possible.

* First stab at file with workflows to calculate Zeff using tomo_1d or Bayesian inference

* Adapted tomo1d examples to run on "pi" bremsstrahlung. Working on phantom and real data.

* Temporary fix to slash channels in spectrometer that are not acquired

* Corrected factor multiplication for zeff calculation from bremsstrahlung

* Initialize variables now easily callable after having instatiated the class

* New example geometry and in standalone method so to be usable also from outside

* Refactored methods to estimate Zeff from bremsstrahlung using inversion or bayesian inference.

* Update bayesmodels.py

adding zeff to saved quantites

* Update bayes_workflow.py

zeff added to plots

* Update example_bayes_opt_brems.py

zeff added to phantom profiles

* Update bayesmodels.py

Zeff -> zeff

* Modified spectrometer reader to select good channels only

* Zeff blob summed over elements

* Zeff blob summed over elements

* Set uncertainty to zero until correctly calculated

* Changed filter limits to nested dictionary to be applicable to diagnostics with multiple quantities

* Corrected minor typo

* Formatting mod to pass pre-commit

* Temporary fix to get abstract reader test to pass.

* Modified workflows to accept both phantoms and experimental data, including fitting of TS.

Four example methods to run at the end of the file.

* Cleaned up so inference works better. Still some inconsistencies between Zeff and Impurity density...

* Refactored to pass pre-commit

---------

Co-authored-by: Marco Sertoli <[email protected]>
Co-authored-by: michael-gemmell <[email protected]>

* Fixed linting issues

* Modified Bayesian phantoms and priors & changed plotting to include a rough uncertainty in Zeff

* Limited Zeff plotting to (0, 10)

* Moved start and end times to call kwargs

* Refactored workflow to get all the steps in the right order.
Both Bayes and Inv now working on phantoms. Inv also on data --> need to find other experimental cases with better EFIT.

* Deleted unused example.

* Fixed pre-commit error

* Fixed issues tied to "c" vs "ar"

* Profile assignment now element dependent

* Deleted print statement in interferometry model

* Deleted example_bayes_opt_brems.py as all zeff profile workflows are now contained in zeff_profile.py

* Deleted background_fit.py that is now included in filter model

* Reverted to previous figheader

---------

Co-authored-by: Marco Sertoli <[email protected]>
Co-authored-by: Aleksandra Alieva <[email protected]>
Co-authored-by: satakihino <[email protected]>
Co-authored-by: michael-gemmell <[email protected]>
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