Change plot profile axis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Change plot profile axis

Eric LEROY
Hello,

Is it possible to change the values of a profile generated with the plot
profile command? My problem is that I have a stack of images separated with
an energy step and I want to plot the profile of a pixel or a region versus
the energy and not the slice number. I have a linear relationship between
the slice number and the energy.

Best regards

Eric
                           \\_//
                          -(@ @)-
 ----------------------oOO--(_)--Ooo-------------------------

       Eric LEROY Dr.
       Institut de Chimie et des Matériaux Paris-Est
       Equipe Chimie Metallurgique des Terres Rares
       UMR 7182 ­ CNRS ­ Paris 12
       Groupe des Laboratoires de Thiais
       2-8, rue Henri Dunant
       94320 THIAIS cedex

       Tel   : (33) (0)1 49 78 12 09 ou 13 24
       Fax   : (33) (0)1 49 78 12 03
       email : [hidden email]
       http://www.icmpe.cnrs.fr
 ------------------------------Oooo.-------------------------
                 .oooO         (   )
                 (   )          ) /
                  \ (          (_/
                   \_)
Reply | Threaded
Open this post in threaded view
|

Re: Change plot profile axis

Michael Schmid
Hi Eric,

you can easily do that with a macro. Select the area of
interest before running it (can be one pixel wide for a
single point).

macro "Plot Stack Profile" {
     if (nSlices < 2) exit("Stack required");
     offset = 10;  //energy of first slice
     step = 5;     //energy step between slices
     x = newArray(nSlices);
     y = newArray(nSlices);
     for (n=1; n<=nSlices; n++) {
         setSlice(n);
         getStatistics(area, mean, min, max, std, histogram);
         x[n-1] = offset + (n-1)*step;
         y[n-1] = mean;
     }
     Plot.create("mean vs. E", "energy", "mean", x, y);
}


Michael
________________________________________________________________

On 18 May 2007, at 14:27, Eric LEROY wrote:

> Hello,
>
> Is it possible to change the values of a profile generated with the  
> plot
> profile command? My problem is that I have a stack of images  
> separated with
> an energy step and I want to plot the profile of a pixel or a  
> region versus
> the energy and not the slice number. I have a linear relationship  
> between
> the slice number and the energy.
>
> Best regards
>
> Eric