File: interpolote.iff

package info (click to toggle)
ifeffit 2%3A1.2.11d-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,332 kB
  • sloc: fortran: 35,441; ansic: 8,458; makefile: 4,727; python: 3,315; perl: 3,144; sh: 2,721; ada: 1,003; tcl: 95
file content (21 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 
#  simple example of using interpolation to  a grid of 0.025
# 
read_data(file = "../data/cu.xmu", group = my, type = xmu)

spline( energy = my.energy, xmu = my.xmu, kweight = 1,
        kmin = 0, kmax = 0, rbkg = 1.1   )
%
newplot( my.k,  my.chi)

grid_size    = 0.025
set new.k    = grid_size * (indarr( (ceil(my.k) / grid_size) + 1)  - 1 )
set new.chi  = splint(my.k, my.chi, new.k)
set new.lin  = interp(my.k, my.chi, new.k)

# pause -- hit return to overplot chi interpolated onto 0.025 Ang grid --

plot( new.k,  new.chi )

show @arrays