Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 01 14:56
    gguzzina edited #3082
  • Jan 31 16:08
    gguzzina edited #3082
  • Jan 31 11:41
    gguzzina commented #3082
  • Jan 31 11:40
    gguzzina commented #3082
  • Jan 31 11:36
    gguzzina commented #3082
  • Jan 30 18:01
    ericpre transferred #3092
  • Jan 30 17:58

    ericpre on RELEASE_next_major

    Check existence of signal.metad… Rename rst file Remove "del signal.metadata.Mar… and 3 more (compare)

  • Jan 30 17:58
    ericpre closed #3091
  • Jan 28 21:41
    codecov[bot] commented #3093
  • Jan 28 21:41
    codecov[bot] commented #3093
  • Jan 28 21:29
    jlaehne labeled #3093
  • Jan 28 21:29
    jlaehne milestoned #3093
  • Jan 28 21:29
    jlaehne labeled #3093
  • Jan 28 21:29
    jlaehne milestoned #3093
  • Jan 28 21:29
    jlaehne opened #3093
  • Jan 28 20:52
    codecov[bot] commented #3063
  • Jan 28 20:50
    codecov[bot] commented #3063
  • Jan 28 20:37
    codecov[bot] commented #3063
  • Jan 28 20:37
    jlaehne synchronize #3063
  • Jan 28 00:12
    pragnayn labeled #3092
Thomas Aarholt
@thomasaarholt
Cool :)
FuhuiSHAO
@FuhuiSHAO
Eric R. Hoglund
@erh3cq
@thomasaarholt Yes. I will send you a link to the data in Slack.
Tommaso Costanzo
@TommasoCostanzo
Is there any work already done to read EDAX new hdf5 files as hyperspy signals?
7 replies
UrsulaLu
@UrsulaLu
image.png
Hi, having the following issue when doing the background subtraction: The plot and the 'Background removal tool' pop up (I find it strange that for Left, right and the lowest only nan appear), I can unclick 'fast', the window disappears and the plot remains completely unchanged. No error message appears. I tried it in the GUI and in JupyterLab (conda). Other plots and function work fine. First time I tried it with a (tif) spectrum image from (Nion swift export) and the other time with the workshop EELs dataset the last days.
image.png
If it is helpful, here a small code snippet, leading to it
Magnus Nord
@magnunor
remove_background.jpg
Just to check: are you able click and drag the "span" the region where you want to fit the background? Do you also get the "GUI-box" directly in the notebook as well?
Jonas Lähnemann
@jlaehne
As far as I remember the closing windows are an issue that is trailing around for longer already and not specific to hyperspy, but comes somewhere from the gui-backends. I also experience a closing of the qt-windows, but not completely reproducibly, often only after a while. My personal workaround at the moment is to have both the traitsui and the ipywidgets gui packages installed. If the qt-window closes, I still have the inline-controls for background removal (or other functions), while the external plot window still remains active and I can drag and span the background region as described by @magnunor .

Does anyone know if we ever figured out the mystery of traits windows randomly closing during interaction (like during remove background or cropping)?

trailing around for a really long time ;-)

UrsulaLu
@UrsulaLu
@magnunor the thing is, there appear no additional plots on top of the initial spectrum, no region (light red) and neither the green nor the blue curve. And just see what you mean with the GUI box, no also that doesn't show up. Same with: %matplotlib notebook
Jonas Lähnemann
@jlaehne
@UrsulaLu the shaded region and additional curves appear only once you click and drag/span with the mouse on the figure to define the background region. It works for me, even though the initial values are nan in the dialog.
UrsulaLu
@UrsulaLu
@jlaehne I can for example still change the spectrum navigator, and the spectrum changes, but the shaded box doesn't appear - no matter where I click. Curious, but why is it showing nans?
Jonas Lähnemann
@jlaehne
Well, the background region is not initiated with any values, so the start and end values do not exist. In the traitsui (qt) window it shows nans, in the ipywidgets inline display it just shows an empty field.
For me an alternative way to make it work is to use %matplotlib widget together with the hyperspy-gui-ipywidgets package. The plot is then displayed inline and I can also add the background region by clicking and dragging on the spectrum window.
Minimum working example:
%matplotlib widget
import hyperspy.api as hs
import numpy as np
s = hs.signals.Signal1D(np.arange(1024))
s.remove_background()
UrsulaLu
@UrsulaLu
image.png
It is really weird, tried it, I get also now the inline GUI window, but still no chance for get
ting the shaded box
UrsulaLu
@UrsulaLu
image.png
image.png
Restarted Kernel and now throws the error. The ipywidgets are installed.
UrsulaLu
@UrsulaLu
@jlaehne After installing ipympl 0.7.0 the background subtraction now finally works. Thanks!
Naren
@narendraraj
we can use python based script the collect 4DSTEM data series with EDX data. We save in h5 format not able to structure it properly include metadata and make it supportable for hyperspy. Please someone guide me how to write out data on hdf5 formate that can support hypersy or /and py4dstem or/and pyxem. If there is information already on how write data please share the link.
7 replies
MurilooMoreira
@MurilooMoreira
Hello guys, I searched a lot in the github and here in the gitter for solutions about how to open jeol eds data and I saw people are trying to do that since few years, but I don't know if someone figured out how to do it in hyperspy. Is it possible? I am with data from jeol eds (.pts, .map, .img, .asw) and I am with difficulties to open it. Someone could help me please?
MurilooMoreira
@MurilooMoreira
I found here that the function to open this type of data is already implemented and it works hyperspy/hyperspy#2488
7 replies
But I don't know how to access the tool to use in my jupyter notebook for example.
wstolp
@wstolp
Hi, rebinning a ComplexSignal2D gave me an error, so I made a small change to the source code, which seems to work. It now rebins the real and imaginary parts seperately.
Anything I need to know before I send a pull request? The developer guide gives me a 404 :(
also I'm very new with github
Thomas Aarholt
@thomasaarholt
Hi @wstolp! Taking a look now about the dev guide!
I can't reproduce the 404 - where did you find it?
I went to https://hyperspy.org/ and pressed "Documentation" under both Stable and Development (on the right hand side)
And then look under "Developer Guide"
We're very happy to help new developers like yourself, so just have a go and we'll help with what you need :)
wstolp
@wstolp
Hi Thomas. Yes later I saw there are multiple developer guide type pages. The 404 I saw here https://github.com/hyperspy/hyperspy, scroll down to "contributing guidelines", then "developer guide".
purewendy
@purewendy
Hello, I would like to do EELS fitting on my data. The hs.preferences.gui() links to GOS directory to C:\Program Files\Gatan. This is the directory of my installed Digital Micrograph. But it's show show errors. Any idea to fix it? Thanks very much!
Weixin Song
@winston-song
Hi All, I use hs.plot.plot_images(atom_percent, scalebar =[0],scalebar_color='white'), is there any way to customize the scalebar length and the fontsize of the scalebar?
Weixin Song
@winston-song

Hi All, I use hs.plot.plot_images(atom_percent, scalebar =[0],scalebar_color='white'), is there any way to customize the scalebar length and the fontsize of the scalebar?

atom_percent is a list

Thomas Aarholt
@thomasaarholt
@purewendy what is your error?
Jędrzej Morzy
@JMorzy
Hi, I have a ragged (yeah, I know :/) data array (1 spectral dimension, 2 'navigation' dimensions that are actually scan number and time). I'd like to do some PCA on it. At the moment, the empty spots in the ragged array are filled with NaNs. Is there any way of making it work despite the NaNs? I was thinking it should be possible to reshape the array into a 1D array (flattening the scan and scan number away) and then re-reshaping it back and looking at the loadings afterwards, but that sounds like a total botch. Any more elegant ideas?
Sorry, 2D. One very long navigation dimension and one normal signal dimension of course
Thomas Aarholt
@thomasaarholt
Hi @JMorzy, which part of your data is ragged? Are you missing entries in the signal or navigation dimension?
I normally think of ragged arrays as ala:
[
    [1,2,3],
    [1,2,3,4],
]
How does this compare with your data?
Jędrzej Morzy
@JMorzy
Exactly, ragged in the navigation dimension. The scans are different lenghts (scan number is my y, time is my x)
Then to make it non-ragged to put it into numpy array/hs signal I filled the gaps with NaNs
2 replies
Corentin Le Guillou
@CorentinLG
Hi all, I am using the non_uniform_axes brnach. Since last update (apparently), the m.set_signal_range() function does not accept explicit axis values, but only axis indices. Ant idea why ? And a suggestion to go around that problem ? thanks
3 replies
Mingquan Xu
@Mingquan_Xu_twitter
Hi, all, is there any packages that can do local low rank denoising for EEL spectrum image?
Thomas Aarholt
@thomasaarholt
What is low rank denoising? I use PCA and ICA a lot for eels in hyperspy.