Skip to content

Added new Examples#253

Open
Lulus792 wants to merge 48 commits intoLumiSpy:mainfrom
Lulus792:examples
Open

Added new Examples#253
Lulus792 wants to merge 48 commits intoLumiSpy:mainfrom
Lulus792:examples

Conversation

@Lulus792
Copy link
Copy Markdown
Contributor

@Lulus792 Lulus792 commented Feb 5, 2026

Added new example map_function, energie_conversion, ROIs, peak_analysis, basic_model_fitting, custom_model_fitting and restructured the old position of the index example. And changed all the data_cleaning examples to use the build in data module of lumispy

Progress of the PR

  • added new example map_function
  • add a changelog entry in the upcoming_changes folder ,
  • ready for review.

@jlaehne jlaehne mentioned this pull request Feb 9, 2026
@jlaehne
Copy link
Copy Markdown
Contributor

jlaehne commented Feb 26, 2026

can you merge in the updated main branch to resolve conflicts with the examples that have been updated in the previous PR

@Lulus792
Copy link
Copy Markdown
Contributor Author

syncing with main didnt quite work so i will have to do it manually i will make the changes in the morning and put the arrow for ready for review once i fixed it.

@Lulus792
Copy link
Copy Markdown
Contributor Author

syncing with main didnt quite work so i will have to do it manually i will make the changes in the morning and put the arrow for ready for review once i fixed it.

should be ready now for review

Comment thread examples/data_selection/indexing.py Outdated
Comment thread examples/data_selection/indexing.py Outdated
Comment thread examples/data_selection/indexing.py Outdated
Comment thread examples/data_selection/indexing.py
Comment thread examples/data_selection/region_of_interest.py Outdated
Comment thread examples/data_selection/region_of_interest.py Outdated
ax1 = s2.axes_manager[0]
ax2 = s2.axes_manager[1]

# define start params
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can a units argument be used here to avoid multiplying by scale factors? I think if cx, cy were not defined the default position of the circle should also place within the bounds of the signal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes we could also just leave it out completly the cx, cy and r part but the result then wouldn't be quite as good, this just the only way to show it interactively how you would then choose the area without being able to actually choose. Tho for simple demonstration of the Circle roi i could be left out.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HyperSpy does have a nice example gallery for ROIs already, in order to not overlap too much I wonder if these examples can be a little more specific to luminescence data analysis. One thing I think could also be included is a computation of calculating the mean of a signal extracted from a ROI - though this is also included in a hyperspy example

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These examples are nice but I wonder if they would be more suited to the HyperSpy example gallery? They don't seem specific to luminescence data, one idea would be to keep the Mathematical Expression header but define a exponential convolved with a gaussian (since this is useful for modelling time-resolved luminescence transients)

Comment thread examples/peak_finding/peak_width.py
Comment thread examples/peak_finding/peak_width.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe also better suited as a hyperspy example?

I don't love that the ohaver function returns a structured array instead of hyperspy signals, if this was changed I think it would make this example better as well.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The Line2D ROI example also appears under Plotting - Extraction of Linescan example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should i then just leave it out and maybe add a different roi and link to the extraction of linescan example for usage of rois like the Line2D

@Lulus792 Lulus792 force-pushed the examples branch 9 times, most recently from eecb913 to 727dbf1 Compare March 13, 2026 12:22
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.

5 participants