|
|
Re: FSC_contour & NaN [message #74468 is a reply to message #74467] |
Wed, 19 January 2011 16:07   |
kisCA
Messages: 78 Registered: January 2011
|
Member |
|
|
On Jan 19, 3:31 pm, David Fanning <n...@dfanning.com> wrote:
> It's called Directions in Barry Lopez's book Desert Notes.
I think I will read this one as soon I finished mine :-)
For my contours, I tried different ways with by increasing 'nb' in :
levels= nb
step = (Max(data,/nan) - Min(data,/nan)) / levels
userLevels = IndGen(levels) * step + Min(data,/nan)
pos = [0.1, 0.1, 0.9, 0.75]
LoadCT, 33, NColors=levels, Bottom=1
FSC_Contour, data,time2,Zint/1000, Levels=userLevels, /
Fill,C_Colors=Indgen(levels)+1, Position=pos
But I can't have the color gradient I obtain with 'TVImage,scaledData'
at least a difference of blue and a bit of red.
I also tried to manage my data by multiply it to have values above 0 --
> only high value appear in red, others are blue,
also calculate a deviation value which is in percent (between -100 and
100), I have more blank than expected...
The worst is when I simply do a 'Contour, data' I can see the contour
but in white. The problem is with the fill...
Any idea ?
Thanks
|
|
|
Re: FSC_contour & NaN [message #74469 is a reply to message #74468] |
Wed, 19 January 2011 15:31   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kisCA writes:
> By the way I tried the code you send above again but with 'TVImage,
> scaledData' and not 'TVImage, data' and I can see the picture I
> want.
I have spent day after dreary day the past couple of weeks
fixing typos in my book. (The members of this newsgroup are
INCREDIBLE proofreaders, by the way!) I think of books as being
maps, directions. And I don't get to this stage without
recalling my favorite story in my favorite book of all time.
It's called Directions in Barry Lopez's book Desert Notes.
It starts out this way.
I would like to tell you how to get there so that you
may see all this for yourself. But first a warning: you
may already have come across a set of detailed instructions,
a map with every bush and stone clearly marked, the
meandering courses of dry rivers and other geographical
features noted, with dotted line put down to represent
the very faintest of trails. [...] Your confidence in
these finely etched maps is understandable, for at first
glance, they seem excellent, the best a man is capable
of; but your confidence is misplaced. Throw them out.
They are the wrong sort of map. They are too thin. They
are not the sort of map that can be followed by a man who
knows what he is doing. The coyote, even the crow, would
regard them with suspicion.
I know, now, why that is. The brain and the fingers are
apparently run by two completely different centers in
the body. Either that, or Coyote has gotten into my head
in an even bigger way than I imagined. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
|
|
|
|
|
|
|
Re: FSC_contour & NaN [message #74481 is a reply to message #74479] |
Wed, 19 January 2011 11:03   |
kisCA
Messages: 78 Registered: January 2011
|
Member |
|
|
On Jan 19, 10:26 am, David Fanning <n...@dfanning.com> wrote:
> missing = Where(data EQ -999.99, count)
> IF count GT 0 THEN data[missing] = !Values.F_NAN
> scaledData = BytScl(data, Top=253, /NAN)
> LoadCT, 33, NColors=254
> TVLCT, FSC_Color('white', /Triple), 254
> IF count GT 0 THEN scaledData[missing] = 254
> TVImage, data
I got a blue window that pop up with that, is it normal?
> P.S. I'll put you down for a copy from the first printing
> run. :-)
Yes please, and if it may be autographed...
PS: Is there a way to change font_size in FSC_Contour because it
doesn't respect the 'font_size' command i put in device?
|
|
|
Re: FSC_contour & NaN [message #74482 is a reply to message #74481] |
Wed, 19 January 2011 10:26   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kisCA writes:
> I will try that one but don't really know how to make the NaN the
> color I want.
> What if I use a missing value instead of NaNs (like -999.99) ?
missing = Where(data EQ -999.99, count)
IF count GT 0 THEN data[missing] = !Values.F_NAN
scaledData = BytScl(data, Top=253, /NAN)
LoadCT, 33, NColors=254
TVLCT, FSC_Color('white', /Triple), 254
IF count GT 0 THEN scaledData[missing] = 254
TVImage, data
Cheers,
David
P.S. I'll put you down for a copy from the first printing
run. :-)
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
|
|
|
Re: FSC_contour & NaN [message #74546 is a reply to message #74467] |
Thu, 20 January 2011 14:48  |
kisCA
Messages: 78 Registered: January 2011
|
Member |
|
|
On Jan 19, 4:39 pm, David Fanning <n...@dfanning.com> wrote:
I would still encourage you to use an image under
> the contour plot lines. I think contouring with a bunch of
> NaNs is a lost cause.
>
I don't really understand why you were trying to say here, could you
please develop a bit more?
I watched my data properly and there is only 8% of my dataset which
are NaN, I didn't expected it could too much...
Also, does BytScl work as well when you got negative data ?
Thanks
|
|
|