Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64771] |
Tue, 20 January 2009 12:03  |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Paolo wrote:
> Craig Markwardt wrote:
>> On Jan 20, 9:00�am, Brian Larsen <balar...@gmail.com> wrote:
>>> Liam,
>>>
>>> thanks this is another great solution to this.
>>>
>>> I find it infinitely interesting how different people approach
>>> problems. �There are inherent "betters" and "worses" with each way
>>> based much on the approach and the particulars of the problem it was
>>> intended for.
>>>
>>> pg_plotimage has the advantage of specifying img, x, y so it does the
>>> axes for you and will scale the pixels log etc but doesnt provide a
>>> clean way to set the zrange (color range), and has some 1/2 pixel
>>> things that are more or less worked out now
>>>
>>> imdisp has the advantage of being a very clean way to display an image
>>> but the user has to specify the axes themselfs, which is often a good
>>> thing. �The zrange capability works easy also, but log scaling isnt
>>> obvious in x and y
>>
>> ...
>>
>> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
>> the same thing for close to a decade.... :-) (with image intensity
>> scaling, axes, standard graphics keywords, pan and zoom, the works).
>
> Hi Craig,
>
> the one and only reason I wrote pg_plotimage was log-scaling in y for
> spectrograms
> (but it was a good learning experience too;-) ).
The time, of course, would have better been spent
by building an improved google news-reader/writer
that doesn't mangle posts so much and uses fixed-width
fonts ;-)
Ciao,
Paolo
>
> There are solarsoft routines that do it, but they are not stand-alone
> and are a bit
> more tricky to fine-tune. But that's where I stole the main ideas ;-)
>
> But the fact that several different versions of programs with similar
> functionality
> exists does point out to a deficency of IDL bult-ins, and is a mistery
> for me why
> such basics stuff has never been implemented by ITT.
>
> Ciao,
> Paolo
>
>>
>> Craig
>>
>> Available from my web page...
>> http://www.physics.wisc.edu/~craigm/idl/graphics.html
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64772 is a reply to message #64771] |
Tue, 20 January 2009 11:58   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Craig Markwardt wrote:
> On Jan 20, 9:00�am, Brian Larsen <balar...@gmail.com> wrote:
>> Liam,
>>
>> thanks this is another great solution to this.
>>
>> I find it infinitely interesting how different people approach
>> problems. �There are inherent "betters" and "worses" with each way
>> based much on the approach and the particulars of the problem it was
>> intended for.
>>
>> pg_plotimage has the advantage of specifying img, x, y so it does the
>> axes for you and will scale the pixels log etc but doesnt provide a
>> clean way to set the zrange (color range), and has some 1/2 pixel
>> things that are more or less worked out now
>>
>> imdisp has the advantage of being a very clean way to display an image
>> but the user has to specify the axes themselfs, which is often a good
>> thing. �The zrange capability works easy also, but log scaling isnt
>> obvious in x and y
>
> ...
>
> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
> the same thing for close to a decade.... :-) (with image intensity
> scaling, axes, standard graphics keywords, pan and zoom, the works).
Hi Craig,
the one and only reason I wrote pg_plotimage was log-scaling in y for
spectrograms
(but it was a good learning experience too;-) ).
There are solarsoft routines that do it, but they are not stand-alone
and are a bit
more tricky to fine-tune. But that's where I stole the main ideas ;-)
But the fact that several different versions of programs with similar
functionality
exists does point out to a deficency of IDL bult-ins, and is a mistery
for me why
such basics stuff has never been implemented by ITT.
Ciao,
Paolo
>
> Craig
>
> Available from my web page...
> http://www.physics.wisc.edu/~craigm/idl/graphics.html
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64773 is a reply to message #64772] |
Tue, 20 January 2009 11:21   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Jan 20, 1:19 pm, Craig Markwardt <cbmarkwa...@gmail.com> wrote:
> On Jan 20, 9:00 am, Brian Larsen <balar...@gmail.com> wrote:
>
>
>
>> Liam,
>
>> thanks this is another great solution to this.
>
>> I find it infinitely interesting how different people approach
>> problems. There are inherent "betters" and "worses" with each way
>> based much on the approach and the particulars of the problem it was
>> intended for.
>
>> pg_plotimage has the advantage of specifying img, x, y so it does the
>> axes for you and will scale the pixels log etc but doesnt provide a
>> clean way to set the zrange (color range), and has some 1/2 pixel
>> things that are more or less worked out now
>
>> imdisp has the advantage of being a very clean way to display an image
>> but the user has to specify the axes themselfs, which is often a good
>> thing. The zrange capability works easy also, but log scaling isnt
>> obvious in x and y
>
> ...
>
> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
> the same thing for close to a decade.... :-) (with image intensity
> scaling, axes, standard graphics keywords, pan and zoom, the works).
>
> Craig
>
> Available from my web page...http://www.physics.wisc.edu/~craigm/idl/graphics.html
Hi,
It is true that there are some very nice routines out there to handle
image display. One of the distinctive features that Paolo built into
pg_plotimage is the ability to log scale the image in the x and/or y
directions. Otherwise, it is hard to beat the old standbys such as
TVImage, TVScale, ImDisp and PlotImage.
Cheers,
Ben
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64774 is a reply to message #64773] |
Tue, 20 January 2009 11:20   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Jan 20, 1:19 pm, Craig Markwardt <cbmarkwa...@gmail.com> wrote:
> On Jan 20, 9:00 am, Brian Larsen <balar...@gmail.com> wrote:
>
>
>
>> Liam,
>
>> thanks this is another great solution to this.
>
>> I find it infinitely interesting how different people approach
>> problems. There are inherent "betters" and "worses" with each way
>> based much on the approach and the particulars of the problem it was
>> intended for.
>
>> pg_plotimage has the advantage of specifying img, x, y so it does the
>> axes for you and will scale the pixels log etc but doesnt provide a
>> clean way to set the zrange (color range), and has some 1/2 pixel
>> things that are more or less worked out now
>
>> imdisp has the advantage of being a very clean way to display an image
>> but the user has to specify the axes themselfs, which is often a good
>> thing. The zrange capability works easy also, but log scaling isnt
>> obvious in x and y
>
> ...
>
> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
> the same thing for close to a decade.... :-) (with image intensity
> scaling, axes, standard graphics keywords, pan and zoom, the works).
>
> Craig
>
> Available from my web page...http://www.physics.wisc.edu/~craigm/idl/graphics.html
Hi,
It is true that there are some very nice routines out there to handle
image display. One of the distinctive features that Paolo built into
pg_plotimage is the ability to log scale the image in the x and/or y
directions. Otherwise, it is hard to beat the old standbys such as
TVImage, TVScale, ImDisp and PlotImage.
Cheers,
Ben
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64775 is a reply to message #64774] |
Tue, 20 January 2009 10:31   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Craig Markwardt writes:
> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
> the same thing for close to a decade.... :-) (with image intensity
> scaling, axes, standard graphics keywords, pan and zoom, the works).
It's eye-opening, isn't it, to see how many people
actual use software that you couldn't imagine getting
through the day *without* using. I guess, collectively,
we are willing to put up with just about anything. ;-)
Cheers,
David
P.S. I just point out, that almost any image display
command you can download (with the notable exceptions of TV
and TVSCL) allows you to display axes on an image. They
have to if they expect to keep up with the competition.
Let's just say I haven't used TV or TVSCL for close to
a decade. :-)
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64776 is a reply to message #64775] |
Tue, 20 January 2009 10:19   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Jan 20, 9:00 am, Brian Larsen <balar...@gmail.com> wrote:
> Liam,
>
> thanks this is another great solution to this.
>
> I find it infinitely interesting how different people approach
> problems. There are inherent "betters" and "worses" with each way
> based much on the approach and the particulars of the problem it was
> intended for.
>
> pg_plotimage has the advantage of specifying img, x, y so it does the
> axes for you and will scale the pixels log etc but doesnt provide a
> clean way to set the zrange (color range), and has some 1/2 pixel
> things that are more or less worked out now
>
> imdisp has the advantage of being a very clean way to display an image
> but the user has to specify the axes themselfs, which is often a good
> thing. The zrange capability works easy also, but log scaling isnt
> obvious in x and y
...
And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
the same thing for close to a decade.... :-) (with image intensity
scaling, axes, standard graphics keywords, pan and zoom, the works).
Craig
Available from my web page...
http://www.physics.wisc.edu/~craigm/idl/graphics.html
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64778 is a reply to message #64776] |
Tue, 20 January 2009 06:00   |
Brian Larsen
Messages: 270 Registered: June 2006
|
Senior Member |
|
|
Liam,
thanks this is another great solution to this.
I find it infinitely interesting how different people approach
problems. There are inherent "betters" and "worses" with each way
based much on the approach and the particulars of the problem it was
intended for.
pg_plotimage has the advantage of specifying img, x, y so it does the
axes for you and will scale the pixels log etc but doesnt provide a
clean way to set the zrange (color range), and has some 1/2 pixel
things that are more or less worked out now
imdisp has the advantage of being a very clean way to display an image
but the user has to specify the axes themselfs, which is often a good
thing. The zrange capability works easy also, but log scaling isnt
obvious in x and y
Just goes to show that when you need a hammer you need a hammer, and
when you need a screwdriver you need a screwdriver, each can
substitute in a pinch but it certainly best to understand your
tools...
Thanks much both of you, I will find a solution from the combination
I'm sure. A screwhammer :)
Brian
------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64791 is a reply to message #64778] |
Sat, 17 January 2009 06:26   |
liamgumley
Messages: 74 Registered: June 2005
|
Member |
|
|
On Jan 16, 11:01 am, Brian Larsen <balar...@gmail.com> wrote:
> Paolo (and anyone else who uses pg_plotimage),
>
> I am having trouble using/modifying pg_plotimage in a way that
> produces the output that I want, so I'll try here.
>
> using the following idl code:
> ctload, 39
> pg_plotimage, dist(10), findgen(10), findgen(10), /iso
>
> I expect to get 100 "pixles" of different values all the same size.
> Instead what I get is an 8x8 region of square pixels surrounded by a
> border of 1/2 sized pixels and corners of 1/4 sized pixels. At least
> for what I am trying to do this isn't the desired output.
>
> In hunting through pg_plotimage I am unable to figure out where the
> border resizing is happening so I can undo it. Does anyone have any
> ideas (or real knowledge) on where they are being changed?
>
> Thanks
>
> Brian
Brian,
You could try IMDISP (http://www.gumley.com/PIP/Programs/imdisp.pro),
e.g.,
loadct, 39
imdisp, dist(10), /axis
Is this what you want?
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64796 is a reply to message #64791] |
Fri, 16 January 2009 12:40   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Brian Larsen wrote:
> While I'm not sure how to fix it the error is evident int he
> difference between these two cases.
> IDL> pg_plotimage, dist(4), findgen(4), findgen(4), /iso, /fulledges
> IDL> pg_plotimage, dist(4), findgen(4), findgen(4), /iso, /fulledges,
> xrange=[-1,5], yrange=[-1,5]
>
> In the first one you get 4x4 pixels but all the borders are half sized
> In the second one you get 4x4 pixels that are all the same size.
Yes, because the image is clipped to the plot area.
This si a failure of the automatic xrange selection process.
I have fixed that (but you may have to
use /xstyle and /ystyle to avoid a margin around the
image, simmilar to the way plot works).
pg_plotimage, dist(4), findgen(4), findgen(4), /iso, /fulledges,/xst,/
yst
Ciao,
Paolo
>
> So it has something to do with letting idl set the x and y ranges in
> the plot. That I can live with since I can set it manually.
>
>
>
> Brian
>
> ------------------------------------------------------------ --------------
> Brian Larsen
> Boston University
> Center for Space Physics
> http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64799 is a reply to message #64796] |
Fri, 16 January 2009 12:12   |
Brian Larsen
Messages: 270 Registered: June 2006
|
Senior Member |
|
|
While I'm not sure how to fix it the error is evident int he
difference between these two cases.
IDL> pg_plotimage, dist(4), findgen(4), findgen(4), /iso, /fulledges
IDL> pg_plotimage, dist(4), findgen(4), findgen(4), /iso, /fulledges,
xrange=[-1,5], yrange=[-1,5]
In the first one you get 4x4 pixels but all the borders are half sized
In the second one you get 4x4 pixels that are all the same size.
So it has something to do with letting idl set the x and y ranges in
the plot. That I can live with since I can set it manually.
Brian
------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
|
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64807 is a reply to message #64801] |
Fri, 16 January 2009 10:04   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Paolo wrote:
> Paolo wrote:
>> Hi Brian,
>> I uploaded a new version to the web.
>>
>> http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/pg_plotima ge.pro
>>
>> Try to call it with the keywords /fulledges
>> and please report if it does what you want.
>
> Actually, belay that,
> I am not happy with the way /fulledges work.
OK, try now.
It's all these half-pixels offsets that drive one crazy...
>
> I'll let you know.
>
> Ciao,
> Paolo
>
>>
>> Thanks for your feedback.
>>
>> Ciao,
>> Paolo
>>
>> Brian Larsen wrote:
>>> Paolo (and anyone else who uses pg_plotimage),
>>>
>>> I am having trouble using/modifying pg_plotimage in a way that
>>> produces the output that I want, so I'll try here.
>>>
>>> using the following idl code:
>>> ctload, 39
>>> pg_plotimage, dist(10), findgen(10), findgen(10), /iso
>>>
>>> I expect to get 100 "pixles" of different values all the same size.
>>> Instead what I get is an 8x8 region of square pixels surrounded by a
>>> border of 1/2 sized pixels and corners of 1/4 sized pixels. At least
>>> for what I am trying to do this isn't the desired output.
>>>
>>> In hunting through pg_plotimage I am unable to figure out where the
>>> border resizing is happening so I can undo it. Does anyone have any
>>> ideas (or real knowledge) on where they are being changed?
>>>
>>> Thanks
>>>
>>> Brian
>>>
>>> ------------------------------------------------------------ --------------
>>> Brian Larsen
>>> Boston University
>>> Center for Space Physics
>>> http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64808 is a reply to message #64807] |
Fri, 16 January 2009 09:55   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Paolo wrote:
> Hi Brian,
> I uploaded a new version to the web.
>
> http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/pg_plotima ge.pro
>
> Try to call it with the keywords /fulledges
> and please report if it does what you want.
Actually, belay that,
I am not happy with the way /fulledges work.
I'll let you know.
Ciao,
Paolo
>
> Thanks for your feedback.
>
> Ciao,
> Paolo
>
> Brian Larsen wrote:
>> Paolo (and anyone else who uses pg_plotimage),
>>
>> I am having trouble using/modifying pg_plotimage in a way that
>> produces the output that I want, so I'll try here.
>>
>> using the following idl code:
>> ctload, 39
>> pg_plotimage, dist(10), findgen(10), findgen(10), /iso
>>
>> I expect to get 100 "pixles" of different values all the same size.
>> Instead what I get is an 8x8 region of square pixels surrounded by a
>> border of 1/2 sized pixels and corners of 1/4 sized pixels. At least
>> for what I am trying to do this isn't the desired output.
>>
>> In hunting through pg_plotimage I am unable to figure out where the
>> border resizing is happening so I can undo it. Does anyone have any
>> ideas (or real knowledge) on where they are being changed?
>>
>> Thanks
>>
>> Brian
>>
>> ------------------------------------------------------------ --------------
>> Brian Larsen
>> Boston University
>> Center for Space Physics
>> http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64809 is a reply to message #64808] |
Fri, 16 January 2009 09:43   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Hi Brian,
I uploaded a new version to the web.
http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/pg_plotima ge.pro
Try to call it with the keywords /fulledges
and please report if it does what you want.
Thanks for your feedback.
Ciao,
Paolo
Brian Larsen wrote:
> Paolo (and anyone else who uses pg_plotimage),
>
> I am having trouble using/modifying pg_plotimage in a way that
> produces the output that I want, so I'll try here.
>
> using the following idl code:
> ctload, 39
> pg_plotimage, dist(10), findgen(10), findgen(10), /iso
>
> I expect to get 100 "pixles" of different values all the same size.
> Instead what I get is an 8x8 region of square pixels surrounded by a
> border of 1/2 sized pixels and corners of 1/4 sized pixels. At least
> for what I am trying to do this isn't the desired output.
>
> In hunting through pg_plotimage I am unable to figure out where the
> border resizing is happening so I can undo it. Does anyone have any
> ideas (or real knowledge) on where they are being changed?
>
> Thanks
>
> Brian
>
> ------------------------------------------------------------ --------------
> Brian Larsen
> Boston University
> Center for Space Physics
> http://people.bu.edu/balarsen/Home/IDL
|
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64811 is a reply to message #64810] |
Fri, 16 January 2009 09:30   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
Hi Brian,
I agree that extending the minimum and maximum values
by half pixels would look nicer.
I'll check how I can modify the code to implement that behaviour.
Ciao,
Paolo
Brian Larsen wrote:
> Paolo (and anyone else who uses pg_plotimage),
>
> I am having trouble using/modifying pg_plotimage in a way that
> produces the output that I want, so I'll try here.
>
> using the following idl code:
> ctload, 39
> pg_plotimage, dist(10), findgen(10), findgen(10), /iso
>
> I expect to get 100 "pixles" of different values all the same size.
> Instead what I get is an 8x8 region of square pixels surrounded by a
> border of 1/2 sized pixels and corners of 1/4 sized pixels. At least
> for what I am trying to do this isn't the desired output.
>
> In hunting through pg_plotimage I am unable to figure out where the
> border resizing is happening so I can undo it. Does anyone have any
> ideas (or real knowledge) on where they are being changed?
>
> Thanks
>
> Brian
>
> ------------------------------------------------------------ --------------
> Brian Larsen
> Boston University
> Center for Space Physics
> http://people.bu.edu/balarsen/Home/IDL
|
|
|
Re: Different sized pixels in pg_plotimage (is this a "feature") [message #64866 is a reply to message #64772] |
Tue, 20 January 2009 23:59  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Jan 20, 2:58 pm, Paolo <pgri...@gmail.com> wrote:
> Craig Markwardt wrote:
>> On Jan 20, 9:00 am, Brian Larsen <balar...@gmail.com> wrote:
>>> Liam,
>
>>> thanks this is another great solution to this.
>
>>> I find it infinitely interesting how different people approach
>>> problems. There are inherent "betters" and "worses" with each way
>>> based much on the approach and the particulars of the problem it was
>>> intended for.
>
>>> pg_plotimage has the advantage of specifying img, x, y so it does the
>>> axes for you and will scale the pixels log etc but doesnt provide a
>>> clean way to set the zrange (color range), and has some 1/2 pixel
>>> things that are more or less worked out now
>
>>> imdisp has the advantage of being a very clean way to display an image
>>> but the user has to specify the axes themselfs, which is often a good
>>> thing. The zrange capability works easy also, but log scaling isnt
>>> obvious in x and y
>
>> ...
>
>> And it's strange to see PG_PLOTIMAGE, since PLOTIMAGE has been doing
>> the same thing for close to a decade.... :-) (with image intensity
>> scaling, axes, standard graphics keywords, pan and zoom, the works).
>
> Hi Craig,
>
> the one and only reason I wrote pg_plotimage was log-scaling in y for
> spectrograms
> (but it was a good learning experience too;-) ).
Heh, I understand.
It was easy enough to add XLOG and YLOG logarithmic axes to PLOTIMAGE,
so I did. At the same time I edited the documentation, which took
about ten times as much time and work as log axes. :-)
Craig
>> Available from my web page...
>> http://www.physics.wisc.edu/~craigm/idl/graphics.html
|
|
|