comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: adding lines of an image together
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: adding lines of an image together [message #67397] Mon, 27 July 2009 14:07
Barbara is currently offline  Barbara
Messages: 17
Registered: July 2009
Junior Member
On Jul 27, 1:51 pm, David Fanning <n...@dfanning.com> wrote:
> Barbara writes:
>> For my research, I need to be able to add/condense lines of a fits
>> image to be able to plot it. It can be up to 100 lines, and so I was
>> thinking I need a program. I was wondering if there was one already
>> created. If not, I was wondering how to set up a program to do this. I
>> have attempted to try and came up with this:
>
>> pro sum_rows, image, start, death, new
>> COMPILE_OPT idl2
>> current=start
>> while (current le death) do begin
>
>> new= image[*,start]++
>> current=new
>> endwhile
>
>> iplot, new
>> end
>
>> (where start is the row i want to start at and death is the place i
>> want to stop) Any advice/help would be appreciated!
>
> How about this:
>
> sumLine = Total(image[*,start:death], 2)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

yep that would do it! Thank you very much!
Re: adding lines of an image together [message #67398 is a reply to message #67397] Mon, 27 July 2009 13:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Barbara writes:

> For my research, I need to be able to add/condense lines of a fits
> image to be able to plot it. It can be up to 100 lines, and so I was
> thinking I need a program. I was wondering if there was one already
> created. If not, I was wondering how to set up a program to do this. I
> have attempted to try and came up with this:
>
> pro sum_rows, image, start, death, new
> COMPILE_OPT idl2
> current=start
> while (current le death) do begin
>
> new= image[*,start]++
> current=new
> endwhile
>
> iplot, new
> end
>
> (where start is the row i want to start at and death is the place i
> want to stop) Any advice/help would be appreciated!

How about this:

sumLine = Total(image[*,start:death], 2)

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: adding lines of an image together
Next Topic: Memory Leak

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 10:44:06 PDT 2025

Total time taken to generate the page: 2.32338 seconds