Comments (3)
I don't understand the point to normalize an image. The colorscale is automatically stretch to fit the min/max value, so normalizing the values won't change the color that you see. This can be tuned by using the vmax argument in order to specify the upper range of the colormap which is useful to compare several images. So as an example if you have an image A and B you can show them as follow:
max_ = max(np.max(A.pixels), np.max(B.pixels))
A.show(vmax=max_)
B.show(vmax=max_)
Is it what you were asking?
EDIT: Otherwise you can access directly the values of the images with .pixels and do the normalization you like with it. You can then plot it with matplotlib as a normal array. Or do the following trick:
import copy
A_normalized = copy.deepcopy(A)
A_normalized.pixels = A_normalized.pixels / normalization_value
A_normalized.show(vmax=some_value_you_like)
from pyspm.
Sorry I usually normalise images by total to remove any topography issues with the sample.
Thanks I will try your recommendation
from pyspm.
For your info, you can retrieve the total number of counts and the primary ions shots of the ITA object X as follow:
X.get_value("Analysis.SICount")['float']
X.get_value("Analysis.PIShots")['float']
from pyspm.
Related Issues (20)
- Question regarding mass calibration and dealing with iontof image files HOT 1
- Calibration of ITM files HOT 1
- https://github.com/scholi/pySPM_data. This URL could not be found . HOT 7
- D:\Anaconda\lib\site-packages\pySPM\data\CristA_0002.xml HOT 3
- Scaling parts of the spectrum HOT 3
- Wired z axis values HOT 4
- Issue with median of differences correction HOT 2
- "li" variable not defined in ITM.py HOT 6
- reuse file format reader in afmformats HOT 3
- Defining regions of interest (ROI) HOT 2
- Nonsquare scans Bruker files (.spm) HOT 5
- SurfaceLab7 .itax & .itm file support HOT 8
- lower case augment support for get_channel() struct.error: unpack requires a buffer of 369664 bytes HOT 1
- Error when opening an ITM File generated by Surface Lab 7 HOT 2
- Bruker spm format: request for explanantion of overall scale computation HOT 1
- Question: basic plotting code HOT 1
- Controlling image axix label size font type..etc HOT 1
- Unable to load an approach curve from Bruker Icon HOT 5
- Error while using correct_lines/ correct_slope on .spm- (Bruker-) data with different x-,y-dimension HOT 2
- Unable to read a SXM file from Nanonis HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyspm.