-
Notifications
You must be signed in to change notification settings - Fork 8
XRT DEM Iterative Solver Module #367
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
Open
joyvelasquez
wants to merge
235
commits into
HinodeXRT:main
Choose a base branch
from
joyvelasquez:xray-plasma-decoder-dem-solver
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
235 commits
Select commit
Hold shift + click to select a range
b3c9b77
New folder and init for DEM efforts
4bea4b7
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez d7b11ab
Add new script that will hold DEM code
cdb20bc
Fixing ruff rules
50a3754
Adding to make new branch'
646b267
Move xrt_dem_iterative module into xrtpy/
574a3e1
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 3406ce6
Updating new function-calling
b6f7a50
Define main elements
ebd02be
Adding observed_intensities function
28db848
Adding observed_intensities function
892c8d5
Adding a quick for consistency;
dd8d69d
Adding functions
26bb0c2
Updated method of naming functions
5b8ebed
Adding XRTDEMIterative class to the init
f5db31c
Adding intensity_errors function
3c04580
Adding conditions to values
5dd94c9
Adding more basic info for using in mandatory functions and check of …
a26dbde
Applied ruff
f97703e
Add basic function to recorde number of MC user wantst to run
5a52acf
Applied black
60d2cf2
Adding max iter
a03a623
Adding create_logT_grid
2798577
Adding _build_response_matrix
fa3d7fd
Trying to get a working initial estimate of how much plasma is emitti…
510035c
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez bc5ec29
Creating a script for monte_carlo_iteration'
46dece7
Adding init
e2fe9a0
WIP: saving changes before rebase
5e704b0
Updating path the data file
25a4394
Updating init info
3f7aa5b
Applied Black
cc06e61
Working on solving DEM scale issue
3ed8726
Working on create_logT_grid
608522b
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 526e3c2
move the emptiness check above the formatter.
3cb632a
Tighten the first error block
abc8dc8
little snippet is just a guardrail to make sure your log-T grid is re…
2c85443
Forgot to define - n_pts
f1df988
Redundant error check block at the end
810a5c1
Minnor clean up
d7fe729
Clean up on docstrings
2f0ec9a
Trigger the warning only once, store the result
aa56f80
Clean up on docstrings
cf2ee0a
Clean up text
e43df5a
Updating create_logT_grid
234b9a8
Applying black
d549f0b
Updated _interpolate_responses_to_grid
4f3b4a2
Removing code where it is used twice for the same reason
3f8f589
Cleaning up some function logic;
f1a310a
Adding ComputeDEMStatistics
e2dd4ef
Script for DEM Stats
3ca6ec3
Adding ComputeDEMStatistics
2a39844
Removing unsed code
05f6b4e
Applying black
04c1163
Minor update to MC code
427cff0
If lmfit is required for any normal use (not just testing)
5538c8d
Syntax error
8835e6f
missing a validate_inputs() method
0bc097e
Putting validate_inputs() inside class
3009e11
Cleaning codedem_solver.py
6ec50f6
Cleaning code
7e939d8
Cleaning code - test
15ac54e
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez a90645c
Updated info about xrt
6282e43
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 6cedf2a
UPdated with two reference for DEM paper
2c2459d
WIP: local changes before pull
9a0fb64
WIP: local changes in dem_solver.py
e648860
Trying to fix git doc 3.13 failing test
fd4e8e1
fixing - generate_temperature_responses reference
f3c10f6
Cleaning function
81161d5
Clean and updated - create_logT_grid
ca85d4c
Update two functions
8d6d3c5
Removing_build_response_matrix function
2b4f761
Removing older version of -_interpolate_responses_to_grid
69765c9
Clean code and apply black to triple checked code
5ef701a
Updated solver still needs alot of work - just saving
28d5b36
Moving plotting function to its own script
a7959ca
Applying black to plotting
6a91264
Updated and cleaned out dem_solver main code
0b3d949
Removed code that is not going to be used
62d1698
Removed and cleared out code - will update soon
a126d1d
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 3bc71eb
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 95ba290
Appling black
254b2e6
Testingccorrect physical units
0ec1638
Corrected use of relative_error and added notes to correct/check later
04bdbfd
Updated function names to better understand/reference in code
e64d476
Debugging-updates made
f8ad163
Adding code incase - observed intensities are all zero.
ddd90bf
Fixing placement of code
9be53d8
Prepare the scaled observed intensities and uncertainties-new function
a08fbf7
Just a note to add test for scaling before being sent to DEM function
77b3bc6
Removed self.logT in the init and kept a sinlge one in a created func…
a12669d
Clean up - _estimate_initial_dem and mirror IDL where I forgot to -Us…
5827f22
Cleaned up code and methods
6bf6ade
Quick clean up
22e92a6
Working on the MC'
c426a25
Removing code that will not be used
5352869
Worked on the code method and finally got a DEM and MC to work, main …
27c23d2
Cleaning up plotting to just two.
9ca92ed
Clean up code and added summary function
ccdf112
Cleaned up plotting functions
18a60e6
Cleaning up minor code issues
337c481
Removed xrt_dem_statistics.py and monte_carlo_iteration.py
952e4cb
Cleaned up summary function
b6c8262
Working on test now
473a0cb
Adding more test
fda3d0e
Correction to warning error output
766370d
Adding more test
d11ef99
spline testing
895834c
Creating test for residuals - dummy data
264a734
Adding more test, and cleaning up formatting
c345534
Now working on docstrings-main function doc
b4d8bfe
Updating intensity_errors doc
b37654f
Cleaned up doc for _interpolate_responses_to_grid and _estimate_initi…
2ba49f7
Added more docstrings and code formatting using tools like black, ruf…
d7012ee
Few string/comment edits
d36d4e0
Cleaning up code and removing comments
b3d851c
Working on docs site for the DEM
c993a66
Updating doc site page
244e5be
Updating DEM doc site
8388f54
Few doc edits
c19e5bc
Trying to fix github doc test to pass
a8e9171
Added three new works-def
c87c2aa
Working on test for DEM;
0dddf65
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 77e651f
Updating testing values to real values
249a5e7
Adding more IDL sav DEM testing files
1588fc0
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez c85ef0d
Merge remote-tracking branch 'upstream/main' into xray-plasma-decoder…
5f3b31e
Adding intensities warning for values given for 2500.
4414b78
Adding warning for Negative observed intensities
7a2017c
Working on doc site
ae16460
Updated text in doc site
3950c2c
Updated in Overview of the XRTDEMIterative section
d88ab9f
Updating text in Comparison with IDL with IDL section
e2d0d2c
Updating text in Mathematical background section
156c2c2
Overall update/review of doc
a752f03
Creating a new rst in reference for XRT DEM
6135cb2
Adding sys
79f5456
Updated some text
6853700
Updating reference files
6c4bbe1
updated init
02c255b
Updated doc string
bf3a32b
Merge branch 'main' into xray-plasma-decoder-dem-solver
705bfa1
Working on a DEM notebook
797e621
Working to fix github doc testing - no passing
52983ad
Updating docstrings
e4397da
Updating api
f34f43e
Reviewing test- clearing up names, test, and methods
7fb6b35
Removed section into a new script
274de17
Adding IDL data for testing with xrtpy- dem
28401e9
New DEM testing-script for IDL and Python
1fc0093
Created a new scipt that will be use to host functions-help break dow…
d3faadb
Applying black to code formatting
a1b9a79
Update DEM test logic and utilities
0b33e14
Merge remote-tracking branch 'upstream/main' into xray-plasma-decoder…
322dd91
Testing out method to fix bug
03636fc
Merge branch 'main' into xray-plasma-decoder-dem-solver
0370bd8
Removing _run_monte_carlo - never reference after all
97bebc9
Updating testing method
ddc02e2
Updating/correcting - weights
a50151c
Removing dead code - testing DEM without it - _prepare_scaled_observa…
1e79dd3
Update test to reflect changes - Python implementation overrides with…
254a91f
Update methods
f46e8cc
Updating number value trigger
df498d4
rename all areas from errors to intensity
62d680b
Cleaning up code
a8330dd
Clean up summary function
4bb13b0
Fixing ruff checks for all
f18455e
Updated plotting methods-better display
47339cf
Minor updates
9f912a1
Cleaning up script
16ce62f
Rename test file to lowercase for consistency
f9b28a5
Rename test file to lowercase for consistency
ea1f9c7
Removing printing statement that is not need
e883c46
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 327a0c8
Fixing pre-commit issue - link to logger placement in code
c0f64aa
Merge branch 'main' into xray-plasma-decoder-dem-solver
997a782
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 2390b0d
Updating text using error to uncertainities
0cd377c
Minor edits
aa089ce
Fixing minor issues to pass github doc test
da0d100
Fixing minor issues to pass github doc test
e4f7d31
Fixing minor issues to pass github doc test
6b26332
Working to pass doc test
abdf343
Working to pass doc test
c630886
Working to pass doc test-part 6
bcc6816
Working to fix doc github testing
d5e2ad0
Working to fix doc github testing
2b72ea7
Renaming files ince CI fast as test
1443e2b
Working to pass Github python 3.13 test
0b3bba6
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 9981430
Working to fix python 3.11 git test
6bbe5bf
Working to fix python 3.11 git test pt2
ec0d254
Working to fix python 3.11 git test pt3
8bdb160
Working to fix python 3.11 git test pt4
43ec4ad
Startign to work on the change log.
2ce2bf5
Startign to work on the change log-pt 2.
2869457
Working on userface printing info
916f51c
Rename DEM test file to test_dem_solver
7c30d30
Added plot smoke tests
aebc73f
Testing intensity_uncertainties
cdfe6cc
Updated-near complete exaple user code
98d2b2c
Updated-near complete exaple user code pt2-git python test not passing
849b30f
Updating plotting to have info about the default error method used fo…
1050245
Creating a tool to run in all sav files for testing
6e3152b
updated solver
cba6d87
Script to help run and open IDL -sav files for DEM testing in XRTpy
fac17be
Helper script for plots
a5e2f4c
Creating a new script to help me test IDL vs XRTpy more cleanly
629027a
Code to plot results from testing/comparsion
ee1122a
Testing script
daa27c1
Updated with 0.5.1 release
e738700
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 92f9f47
Removing random script
85b5554
Merge branch 'main' into xray-plasma-decoder-dem-solver
b681488
Moving older testing methods to other section before deleting
832219f
Removing legacy IDL comparsion scripts and test data files
c8ffa0b
Moving a checking-function yup sooner to makes sure it gets triggered…
e07d3e5
Adding more basic testing with expected outcomes
3e6c4cc
Adding more basic testing with expected outcomes-pt2
0264f49
Correction to _reconstruct_dem_from_knots function- n_spl >= 2
042daec
Updated and latest basic testing - 3 real bugs caught!
51d6ada
Updates
49dd192
Will be working on this soon - empty for now
696264b
Created to help plot test
b74f359
Minnor changes
3371f8e
Will be adding to it soon
8d5bcd8
Push forward to move to a different PR
a57b5c1
Push forward to move to a different PR
c4e5758
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez 16fb69f
Merge branch 'main' into xray-plasma-decoder-dem-solver
joyvelasquez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| import matplotlib | ||
| matplotlib.use("Agg") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| XRTpy v0.6.0 (2026-05-04) | ||
| ========================= | ||
|
|
||
| New Features | ||
| ------------ | ||
| - Introduced :class:`~xrtpy.xrt_dem_iterative.XRTDEMIterative`, a Python | ||
| implementation of the IDL routine ``xrt_dem_iterative2.pro``. This solver | ||
| uses spline-parameterized DEM curves and iterative least-squares fitting to | ||
| infer the differential emission measure from Hinode/XRT multi-filter | ||
| observations. (Will udpate with PR) | ||
| - Added Monte Carlo uncertainty estimation to the DEM solver via the | ||
| ``monte_carlo_runs`` parameter. Perturbed intensity realizations are used | ||
| to estimate the spread in DEM(T). | ||
| - Added ``plot_dem()`` and ``plot_dem_mc()`` methods to | ||
| :class:`~xrtpy.xrt_dem_iterative.XRTDEMIterative` for visualizing the | ||
| base DEM solution and Monte Carlo ensemble. | ||
|
|
||
| Documentation Updates | ||
| --------------------- | ||
| - Added a new overview page ``dem_overview.rst`` providing an introduction | ||
| to DEM analysis with Hinode/XRT, the mathematical background, and | ||
| worked examples using :class:`~xrtpy.xrt_dem_iterative.XRTDEMIterative`. | ||
|
|
||
| - Added API reference page for ``xrtpy.xrt_dem_iterative``. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this file be extracted into a separate PR?