Skip to main content

Posts

Showing posts from October, 2018

Mask creation

// A practice to create mask by built-in function // iradius, itheta, tert image img:=RealImage("Mask",4,256,256) // for STEM equivalent detector image BF, ABF, LAADF, HAADF BF=img*0 BF=(iradius<10) BF.SetName("BF") ABF=img*0 ABF=(iradius>=10 & iradius<20) ABF.SetName("ABF") LAADF=img*0 LAADF=(iradius>=60 & iradius <80) LAADF.SetName("LAADF") HAADF=img*0 HAADF=(iradius>=100 & iradius<135) HAADF.SetName("HAADF") BF.ShowImage() ABF.ShowImage() LAADF.ShowImage() HAADF.ShowImage() // for DPC detector, 4 segment // set rotate angle number ang=15 if(ang>=90) { ang=0 } ang=pi()*ang/180 // Note that the itheta is varied counterclockwise from 0 to -pi() when y>0  //                                                        and clockwise from 0 to +pi() when y<0  ...

Creating new orthogonal cell via VESTA

The VESTA can be downloaded via http://jp-minerals.org/vesta/en/download.html Original cell Si, space group:Fd-3m, a=5.43. The cell would be looked like... Transform For new cell new a axis: original [1 -1 0] direction new b axis: original [1 1 -2] direction new c axis: original [1 1 1] direction Result new cell: a* projection: [1-10] zone axis b* projection: [11-2] zone axis c* projection: [111] zone axis

Ptychography (1) Basic Concept

Coherent Diffractive Imaging [1] Also known as lensless imaging , is based on the retrieval of a complex sample structure (phase) from a measurement of scattered radiation intensity from a coherently illuminated sample out of the imaging plane. [2] Coherent diffractive imaging (CDI) is an alternative technique that promises, in theory, to allow imaging of specimens at a resolution limited only by the wavelength of the illuminating radiation. CDI replaces the imaging optics and their associated imperfections, with a solution to an inverse problem (phase problem) . The inversion step involves determining the complex exit-surface wave function from the recorded intensity, which in the case of diffractive imaging is in the far field.  Reconstruction of the full complex exit wave recovers the amplitude and phase of the specimen transmission function, related to physical properties of the specimen. CDI involves a non-linear inverse problem and the consequent issue of the...

Top hat filter

The top_hat filter can be used to detect the relatively small edges/peaks superimposed on large background signals. The concept came from the EELS workshop during IMC19. Thanks to Prof. Nestor J. Zaluzec. -- // Using Top_hat digital filter to detect the  relatively small edges  //    superimposed on large background signals. // // ref: Ultramicroscopy 18 (1985) 185-190  //      Digital Filters  for Application to Data Analysis in EELS //      by Nestor J. ZALUZEC // Parameters: // win_s: signal window (default:3) // win_b: background window (default:3) //  a_s : amplitude of signal (fixed value) //  a_b : amplitude of background  (fixed value) // Renfong 2018/10/11 // Main function image Top_Hat_Filter(image img, number win_s, number win_b) { // read image string fname=img.GetName() number sx,sy img.getsize(sx,sy) // filter image img2 := imageclone(img)*0 //the area between...

Practice of dm-script build-in function: icol & calibration information

Using icol function to create peak. Gaussian peak I=A*exp((x-mu)^2/(2*sigma^2) where mu is the peak center            sigma is the divergence of the peak -- image img=RealImage("peak",4,1024,1) //  peak 1 parameters // N_K edge number int1=30 number mu1=300 number sig1=5 // peak 2 parameters // O_K edge number int2=150 number mu2=432 number sig2=0.9 number int3=50 number mu3=438 number sig3=2.5 // add noise number noise=0.5 // EELS signal creation img=int1*exp(-1*(icol-mu1)**2/(2*sig1**2)) img+=int2*exp(-1*(icol-mu2)**2/(2*sig2**2)) img+=int3*exp(-1*(icol-mu3)**2/(2*sig3**2)) img+=0.05*exp(10-icol/100)+noise*int1*random() // Write calibration img.ImageSetDimensionOrigin(0,100) img.ImageSetDimensionScale(0,1) img.ImageSetDimensionUnitString(0, "eV" ) img.ImageSetIntensityUnitString( "e-" ) img.setname("Test Spec + " + noise*100 + "% noise") img.showimage() -- Result