Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 28 21:05
    codecov[bot] commented #2703
  • Nov 28 21:04
    codecov[bot] commented #2703
  • Nov 28 20:54
    magnunor commented #2703
  • Nov 28 20:54
    magnunor commented #2703
  • Nov 28 20:51
    codecov[bot] commented #2703
  • Nov 28 20:51
    magnunor synchronize #2703
  • Nov 28 20:42
    codecov[bot] commented #2781
  • Nov 28 20:31
    codecov[bot] commented #2703
  • Nov 28 20:31
    codecov[bot] commented #2703
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:30
    din14970 edited #2781
  • Nov 28 20:29
    codecov[bot] commented #2781
  • Nov 28 20:29
    din14970 synchronize #2781
  • Nov 28 20:17
    codecov[bot] commented #2703
  • Nov 28 20:17
    magnunor synchronize #2703
Thomas Aarholt
@thomasaarholt
That contains the merged non-uniform functionality
Hugh Ramsden
@0Hughman0
I am reassured by the word RELEASE in that url 😜
Thomas Aarholt
@thomasaarholt
Hehehe :p
Hugh Ramsden
@0Hughman0
ty
Mingquan Xu
@Mingquan_Xu_twitter
Hi, all, how can I map out Signal (Dynamic) in HyperSpy: when I change the energy-loss region in SI, the mapping change simultaneously.
I guess I need the interactive(), but do not find such a example in the online-documentation page.
Could you give me a hint for this?
Mingquan Xu
@Mingquan_Xu_twitter
image.png
I have used the above method to do this, but not sure whether there is a better way?
Tan-Shengdong
@Tan-Shengdong
微信截图_20211018101225.png
微信截图_20211018101214.png
Hi all, when I used Hyperspy to deal with EDS data, I noted that there is some shift of the same peak (such as Pt_La) among different data.
I have used add_elements(), add_line() and calibrate_xray_lines()
Thomas Aarholt
@thomasaarholt
@Tan-Shengdong is there a question there? :)
@Mingquan_Xu_twitter Could you explain a bit further what you want? "map out Signal (Dynamic)" wasn't very clear.
Tan-Shengdong
@Tan-Shengdong
@thomasaarholt I just want to ask why there is a shift? I think the x-ray position of each element should be a constant.
Thomas Aarholt
@thomasaarholt
Oh, I see. I'm not sure of the physical reason either, but I've definitely heard of shifts before - it's why the calibration functions exist.
Zanetta Pierre-marie
@ZanettaPM
@Tan-Shengdong I think that is because you use calibrate_xray_lines() it tunes the parameter of the Gaussian and among them the center position. I you just wants to change the energy resolution use calibrate_energy_resolution()
adriente
@adriente

Hello,

I am using VSCode as an IDE. I use the jupyter plugin that enables jupyter notebooks to be used in the interface of VSCode. Everything was working well until recently. Now when I have a cell with :

import hyperspy.api as hs

The kernel dies. It is working well with import hyperspy though. Is that a known issue ? Is anybody else using VSCode and the hyperspy api ?

Thomas Aarholt
@thomasaarholt
Interesting! I can give it a shot later this weekend. Any idea how recently it was working?
18 replies
Abohaitham92
@Abohaitham92
Hello all, I have a question regarding loading an .edm file and then saving it to hdf5 file, i just loaded an edm file using s = hs.load(edm_file), which gave me a list of signals, what is the best way to save all of these signals into one hdf5 file ? I used to save one signal using s.save(test.hdf5). But now using the save command for each signal in my list on the same file will overwrite the file.
1 reply
lnaglecocco
@lnaglecocco
image.png
Hi, I think someone explained this to me before but I don't remember the explanation and can't find it - sorry. When I plot a model with plot_components=True, some of the components have features which shouldn't be part of the component. For example the red peak here is a GaussianHF yet it has features around 800 eV which contribute to the overall fit. What is that all about?
2 replies
lnaglecocco
@lnaglecocco
Another unrelated question, and thank you in advance. I have a dataset for which fitting a model can be quite time-consuming. So rather than re-fitting every time I load it up and want to look at it, I'd like to save it and simply load the file. However - when I try code like ".model.save("model",extension="hspy")", and then "model_2 = hs.load("model.hspy")", model_2 doesn't seem to have the model, just the experimental data. How can I save a model?
2 replies
DENSmerijn
@DENSmerijn
Hi all, we are trying to load a Velox .mrc file but we keep getting the following error: ValueError: cannot convert float NaN to integer
We have tried multiple files, all with the same outcome. Any idea what could be causing this issue?
7 replies
Mingquan Xu
@Mingquan_Xu_twitter
image.png
If I want to fit a fractional energy-range in my spectrum, how can I use the m.fit() function?
Like only fit the energy range marked in orange above
2 replies
Mingquan Xu
@Mingquan_Xu_twitter
image.png
3 replies
Hi, all, if I want to get the data-points of my model-fitting, the green line, how to do it? Because I want use those data-points to plot it individually.
Mingquan Xu
@Mingquan_Xu_twitter
Hi, all, recnetly I am trying Matlab to treat my spectrum image data, but I donot know how to expot the data after processing. Are there any matlab scripts can write the spectrum image data? such as to .mrc ?
lnaglecocco
@lnaglecocco
Hi, is there a way to exclude certain pixels (with each pixel containing a spectrum) from a model before fitting? I've written an algorithm which produces an array of coordinates representing pixels which are not part of my sample, but I'm not sure how to make that happen. I know I can use .inav[x1:x2,y1:y2] but my sample is not a perfect square so just cropping isn't quite what I want to do
8 replies
lnaglecocco
@lnaglecocco
I have another question which probably has a very simple fix. When I do model.plot() the spectrum at each pixel is normalised such that the plot fits perfectly. However, when I set plot_components=True, I get it so that only part of the data fits in the y axis. I've figured out that this is because it's setting the y-axis bounds for the graph based on a single component, rather than the total fit. How can I fix this so that model.plot(plot_components=True) gives each pixel normalised to the total fit rather than the y-span of a single component?
2 replies
OliDG
@OliDG
Hi,
I try to find a way to save my "file.hspy" using the save() function to a specific path, but I can't see a "path" argument in the function description. Ideally, I was hoping to get the path from the hs.load() function ("load.path/of/my/loadedfile") and use it to save to the same folder without having to manually enter a path ( I have many datasets from many different folders).
20 replies
Jędrzej Morzy
@JMorzy

Is there a way of adapting 'fit_component' function to work using multiple threads on a CPU? The only mention of parallel processes that I found in the docs was in SAMFire and in the map function. I have a relatively specific order of component fits (for EELS core-loss data) that I wouldn't want to change. Any advice on how to approach this would be appreciated!

(I just recently got my hands on a computer, where parallelising would save a significant amount of time)

2 replies
Rosenkranz1
@Rosenkranz1
Hello. I am fairly new to programming, and i am trying to write some extensions to the HyperSpy program. I know how to write a class and have the class inherit etc, but when i create a class for a HyperSpy extension, which should basically inherit the "whole" of HyperSpy so i can use the methodes in HyperSpy in my extension, what is the best approach for this?
I should fork the github repo, but for me it is not very intuitive, what the best way to write extensions are.
I have read the documentation on this, from HyperSpys websites, but i need some elaboration.
Any advice is highly appriciated!
6 replies
Rosenkranz1
@Rosenkranz1

Hello, i have a followup question for my question above.

I want to contribute to a package that already excist (The eds packages). How would i go about using my contribution? By forking the repo and including my methodes in the relevant classes or should i create my own class, and have that inherit from eds? In the latter case, i am struggeling to get the inheritance to work properly, i have written some code, but when i try to apply my method too a dataset it exclaim that EDSSpectrum does not have the attribute, should correct inheritance not fix this? Or is the only way to create my code in a forked repo of the relevant signal?
This might be a trivial question but i cant seem to find the answer. (Maybe i lack some understandig of classes)

6 replies
Weixin Song
@winston-song
Hi All, I use DM to record some EDX spectral images, when I process them using PCA, it shows 'ValueError: zero-size array to reduction operation minimum which has no identity' whether anyone knows how to resolve this problem? thanks
Weixin Song
@winston-song
image.png
Eric R. Hoglund
@erh3cq
Are there any EXELFS functions or plugins for HyperSpy?
Francisco de la Peña
@francisco-dlp
Is it an EDX model? The issue may be that more elements require more memory—are you saturating your memory by any chance?
1 reply
Markus Wollgarten
@w-markus
Dear all, a rather simple question: when loading dm3 files of diffraction data the metadata only contains the 'General' branch. Is there a signal type one should request upon loading, that more metadata fields are available even if not filled yet? Thanks a lot! Markus
5 replies
Mingquan Xu
@Mingquan_Xu_twitter
image.png
1 reply
A simple question: how to improve this fitting.
I used a "g1 = hs.model.components1D.Gaussian()" to do this fit and want to get the center of this peak.
Jonas Lähnemann
@jlaehne
kociak
@kociak
Dear all. I have an annoying issue with installing hyperspy for use in an environment having the last version of nionswift. The conflict comes from the fact that hs requires numba, and numba requires numpy <=1.20 (hs installs 1.20.3). But nionswift requires numpy 1.21.4 (I guess for the Typing functionalities). My question: can we switch off the use of numba in hyperspy? thanks guys
6 replies
kociak
@kociak
@thomasaarholt: lean and fit. i'll take a look at that and tell you if that works (hopefully I won't get stuck by another hidden compatibility issue :)