Re: How to add modified color tables to IDL 7.1 [message #79611] |
Tue, 20 March 2012 07:34 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David López writes:
> You are my hero....
> wonderful........runing...my new palette Rainbow..... is a correct
> commands...
I don't want to sound old, but in my day, you had
to do more than put a couple of commands in a logical order
to become a hero. ;-)
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: How to add modified color tables to IDL 7.1 [message #79612 is a reply to message #79611] |
Tue, 20 March 2012 06:59  |
David López
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
On Mar 20, 5:14 am, Fabien <fabien.mauss...@gmail.com> wrote:
> On 03/19/2012 09:27 PM, David López wrote:
>
>
>
>> On Mar 16, 1:29 pm, Fabien<fabien.mauss...@gmail.com> wrote:
>>> On 03/16/2012 05:25 PM, David López wrote:
>
>>>> Hi Andrew
>>>> Thanks a lot... but make a mistake!!!!!
>>>> but my result was copied rainbow palette number 13 to number 41 but
>>>> both remain in grayscale.
>>>> my command was!!!
>
>>>> IDL> TVLCT, r, g, b, /Get
>>>> IDL> ModifyCT, 13, 'Rainbow', r, g, b
>
>>> Well at this point it happened what people told you to be careful
>>> about... You overwrote the IDL rainbow colortable with the IDL grayscale
>>> colortable.
>
>> Hello Again...
>> I can create new file rainbow in the palette
>> but I can not save changes change when I modified with xpalette...
>> my commands was!!
>
>> IDL> TVLCT, r, g, b, /Get
>> IDL> ModifyCT, 41, 'Rainbow'
>> IDL> XPALETTE for modify colors.....
>
>> Regards
>
> Hi,
>
> IDL> loadct, 13 ; The colors are loaded internaly
> IDL> XPALETTE ; Modify colors as you want them
> IDL> TVLCT, r, g, b, /Get ; Get the modified colors as r g b triple
> IDL> MODIFYCT, 51, "MyRainbow", r, g, b ; Save them in IDL
Hello Fabien
You are my hero....
wonderful........runing...my new palette Rainbow..... is a correct
commands...
Thanks a lot
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79613 is a reply to message #79612] |
Tue, 20 March 2012 02:14  |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
On 03/19/2012 09:27 PM, David L�pez wrote:
> On Mar 16, 1:29 pm, Fabien<fabien.mauss...@gmail.com> wrote:
>> On 03/16/2012 05:25 PM, David L�pez wrote:
>>
>>
>>
>>> Hi Andrew
>>> Thanks a lot... but make a mistake!!!!!
>>> but my result was copied rainbow palette number 13 to number 41 but
>>> both remain in grayscale.
>>> my command was!!!
>>
>>> IDL> TVLCT, r, g, b, /Get
>>> IDL> ModifyCT, 13, 'Rainbow', r, g, b
>>
>> Well at this point it happened what people told you to be careful
>> about... You overwrote the IDL rainbow colortable with the IDL grayscale
>> colortable.
>
> Hello Again...
> I can create new file rainbow in the palette
> but I can not save changes change when I modified with xpalette...
> my commands was!!
>
>
> IDL> TVLCT, r, g, b, /Get
> IDL> ModifyCT, 41, 'Rainbow'
> IDL> XPALETTE for modify colors.....
>
> Regards
>
Hi,
IDL> loadct, 13 ; The colors are loaded internaly
IDL> XPALETTE ; Modify colors as you want them
IDL> TVLCT, r, g, b, /Get ; Get the modified colors as r g b triple
IDL> MODIFYCT, 51, "MyRainbow", r, g, b ; Save them in IDL
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79617 is a reply to message #79613] |
Mon, 19 March 2012 13:27  |
David López
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
On Mar 16, 1:29 pm, Fabien <fabien.mauss...@gmail.com> wrote:
> On 03/16/2012 05:25 PM, David López wrote:
>
>
>
>> Hi Andrew
>> Thanks a lot... but make a mistake!!!!!
>> but my result was copied rainbow palette number 13 to number 41 but
>> both remain in grayscale.
>> my command was!!!
>
>> IDL> TVLCT, r, g, b, /Get
>> IDL> ModifyCT, 13, 'Rainbow', r, g, b
>
> Well at this point it happened what people told you to be careful
> about... You overwrote the IDL rainbow colortable with the IDL grayscale
> colortable.
Hello Again...
I can create new file rainbow in the palette
but I can not save changes change when I modified with xpalette...
my commands was!!
IDL> TVLCT, r, g, b, /Get
IDL> ModifyCT, 41, 'Rainbow'
IDL> XPALETTE for modify colors.....
Regards
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79635 is a reply to message #79617] |
Fri, 16 March 2012 10:29  |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
On 03/16/2012 05:25 PM, David L�pez wrote:
>
> Hi Andrew
> Thanks a lot... but make a mistake!!!!!
> but my result was copied rainbow palette number 13 to number 41 but
> both remain in grayscale.
> my command was!!!
>
> IDL> TVLCT, r, g, b, /Get
> IDL> ModifyCT, 13, 'Rainbow', r, g, b
Well at this point it happened what people told you to be careful
about... You overwrote the IDL rainbow colortable with the IDL grayscale
colortable.
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79636 is a reply to message #79635] |
Fri, 16 March 2012 09:25  |
David López
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
On Mar 15, 9:41 pm, Andrew Cool <andrew.c...@dsto.defence.gov.au>
wrote:
> On Mar 16, 11:09 am, David López <david.lo...@ceaza.cl> wrote:
>
>
>
>> On Mar 15, 6:18 pm, Michael Galloy <mgal...@gmail.com> wrote:
>
>>> On 3/15/12 3:52 PM, David López wrote:
>
>>>> On Mar 15, 5:15 pm, nata<bernat.puigdomen...@gmail.com> wrote:
>>>> > Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
>
>>>> > After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
>
>>>> > Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
>
>>>> > Dale !
>>>> > nata
>
>>>> Thanks a Lot Nata...
>>>> but now I have this problem
>
>>>> % Compiled module: MODIFYCT.
>>>> % Variable is undefined: ITAB.
>>>> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
>>>> modifyct.pro
>>>> % $MAIN$
>>>> % Execution halted at: $MAIN$
>
>>>> Thanks a lot
>
>>> Could you show the command that caused this error?
>
>>> I have several other color tables files that I access with the FILE
>>> keyword of [X]LOADCT and find this a quite nice way to store color tables.
>
>>> Mike
>>> --
>>> Michael Galloywww.michaelgalloy.com
>>> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
>>> Research Mathematician
>>> Tech-X Corporation
>
>> Thanks a Mister Galloy...
>> but do not understand why not work
>> my steps are:
>> open idl like superuser
>> sudo idlde
>> in console IDLDE
>> loadct for select color number 13 Rainbow
>> xpalette for change color..
>> modifyct...
>
>> IDL> loadct
>> % Compiled module: LOADCT.
>> % Compiled module: FILEPATH.
>> 0- B-W LINEAR 14- STEPS 28- Hardcandy
>> 1- BLUE/WHITE 15- STERN SPECIAL 29- Nature
>> 2- GRN-RED-BLU-WHT 16- Haze 30- Ocean
>> 3- RED TEMPERATURE 17- Blue - Pastel - R 31- Peppermint
>> 4- BLUE/GREEN/RED/YE 18- Pastels 32- Plasma
>> 5- STD GAMMA-II 19- Hue Sat Lightness 33- Blue-Red
>> 6- PRISM 20- Hue Sat Lightness 34- Rainbow
>> 7- RED-PURPLE 21- Hue Sat Value 1 35- Blue Waves
>> 8- GREEN/WHITE LINEA 22- Hue Sat Value 2 36- Volcano
>> 9- GRN/WHT EXPONENTI 23- Purple-Red + Stri 37- Waves
>> 10- GREEN-PINK 24- Beach 38- Rainbow18
>> 11- BLUE-RED 25- Mac Style 39- Rainbow + white
>> 12- 16 LEVEL 26- Eos A 40- Rainbow + black
>> 13- RAINBOW 27- Eos B
>> Enter table number: 13
>> % LOADCT: Loading table RAINBOW
>> IDL> xpalette
>> % Compiled module: XPALETTE.
>> % Compiled module: XREGISTERED.
>> % Compiled module: CW_FIELD.
>> % Compiled module: CW_BGROUP.
>> % Compiled module: CW_RGBSLIDER.
>> % Compiled module: CW_FSLIDER.
>> % Compiled module: CW_COLORSEL.
>> % Compiled module: CT_LUMINANCE.
>> % Compiled module: COLORMAP_APPLICABLE.
>> % Compiled module: XMANAGER.
>> % Compiled module: XLOADCT.
>> IDL> modifyct
>> % Compiled module: MODIFYCT.
>> % Variable is undefined: ITAB.
>> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
>> modifyct.pro
>> % $MAIN$
>> % Execution halted at: $MAIN$
>
>> any idea...
>> Regards
>
> Yes, You have not supplied the table index parameter!
> You must tell ModifyCT which table you want to modify...
>
> Try using Help, modifyct at the command line
>
> Andrew
Hi Andrew
Thanks a lot... but make a mistake!!!!!
but my result was copied rainbow palette number 13 to number 41 but
both remain in grayscale.
my command was!!!
IDL> TVLCT, r, g, b, /Get
IDL> ModifyCT, 13, 'Rainbow', r, g, b
% Compiled module: MODIFYCT.
% Compiled module: FILEPATH.
IDL> XColors
% Compiled module: XCOLORS.
% Compiled module: FIND_RESOURCE_FILE.
% Compiled module: PROGRAMROOTDIR.
% Compiled module: STRSPLIT.
% Compiled module: XREGISTERED.
% Compiled module: LOADCT.
% Compiled module: XMANAGER.
IDL> ModifyCT, 41, 'Rainbow', r, g, b
IDL> xloadct
Any Idea!!!
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79637 is a reply to message #79636] |
Thu, 15 March 2012 18:41  |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
On Mar 16, 11:09 am, David López <david.lo...@ceaza.cl> wrote:
> On Mar 15, 6:18 pm, Michael Galloy <mgal...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> On 3/15/12 3:52 PM, David López wrote:
>
>>> On Mar 15, 5:15 pm, nata<bernat.puigdomen...@gmail.com> wrote:
>>>> Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
>
>>>> After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
>
>>>> Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
>
>>>> Dale !
>>>> nata
>
>>> Thanks a Lot Nata...
>>> but now I have this problem
>
>>> % Compiled module: MODIFYCT.
>>> % Variable is undefined: ITAB.
>>> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
>>> modifyct.pro
>>> % $MAIN$
>>> % Execution halted at: $MAIN$
>
>>> Thanks a lot
>
>> Could you show the command that caused this error?
>
>> I have several other color tables files that I access with the FILE
>> keyword of [X]LOADCT and find this a quite nice way to store color tables.
>
>> Mike
>> --
>> Michael Galloywww.michaelgalloy.com
>> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
>> Research Mathematician
>> Tech-X Corporation
>
> Thanks a Mister Galloy...
> but do not understand why not work
> my steps are:
> open idl like superuser
> sudo idlde
> in console IDLDE
> loadct for select color number 13 Rainbow
> xpalette for change color..
> modifyct...
>
> IDL> loadct
> % Compiled module: LOADCT.
> % Compiled module: FILEPATH.
> 0- B-W LINEAR 14- STEPS 28- Hardcandy
> 1- BLUE/WHITE 15- STERN SPECIAL 29- Nature
> 2- GRN-RED-BLU-WHT 16- Haze 30- Ocean
> 3- RED TEMPERATURE 17- Blue - Pastel - R 31- Peppermint
> 4- BLUE/GREEN/RED/YE 18- Pastels 32- Plasma
> 5- STD GAMMA-II 19- Hue Sat Lightness 33- Blue-Red
> 6- PRISM 20- Hue Sat Lightness 34- Rainbow
> 7- RED-PURPLE 21- Hue Sat Value 1 35- Blue Waves
> 8- GREEN/WHITE LINEA 22- Hue Sat Value 2 36- Volcano
> 9- GRN/WHT EXPONENTI 23- Purple-Red + Stri 37- Waves
> 10- GREEN-PINK 24- Beach 38- Rainbow18
> 11- BLUE-RED 25- Mac Style 39- Rainbow + white
> 12- 16 LEVEL 26- Eos A 40- Rainbow + black
> 13- RAINBOW 27- Eos B
> Enter table number: 13
> % LOADCT: Loading table RAINBOW
> IDL> xpalette
> % Compiled module: XPALETTE.
> % Compiled module: XREGISTERED.
> % Compiled module: CW_FIELD.
> % Compiled module: CW_BGROUP.
> % Compiled module: CW_RGBSLIDER.
> % Compiled module: CW_FSLIDER.
> % Compiled module: CW_COLORSEL.
> % Compiled module: CT_LUMINANCE.
> % Compiled module: COLORMAP_APPLICABLE.
> % Compiled module: XMANAGER.
> % Compiled module: XLOADCT.
> IDL> modifyct
> % Compiled module: MODIFYCT.
> % Variable is undefined: ITAB.
> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
> modifyct.pro
> % $MAIN$
> % Execution halted at: $MAIN$
>
> any idea...
> Regards
Yes, You have not supplied the table index parameter!
You must tell ModifyCT which table you want to modify...
Try using Help, modifyct at the command line
Andrew
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79638 is a reply to message #79637] |
Thu, 15 March 2012 18:09  |
David López
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
On Mar 15, 6:18 pm, Michael Galloy <mgal...@gmail.com> wrote:
> On 3/15/12 3:52 PM, David López wrote:
>
>
>
>> On Mar 15, 5:15 pm, nata<bernat.puigdomen...@gmail.com> wrote:
>>> Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
>
>>> After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
>
>>> Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
>
>>> Dale !
>>> nata
>
>> Thanks a Lot Nata...
>> but now I have this problem
>
>> % Compiled module: MODIFYCT.
>> % Variable is undefined: ITAB.
>> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
>> modifyct.pro
>> % $MAIN$
>> % Execution halted at: $MAIN$
>
>> Thanks a lot
>
> Could you show the command that caused this error?
>
> I have several other color tables files that I access with the FILE
> keyword of [X]LOADCT and find this a quite nice way to store color tables.
>
> Mike
> --
> Michael Galloywww.michaelgalloy.com
> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
> Research Mathematician
> Tech-X Corporation
Thanks a Mister Galloy...
but do not understand why not work
my steps are:
open idl like superuser
sudo idlde
in console IDLDE
loadct for select color number 13 Rainbow
xpalette for change color..
modifyct...
IDL> loadct
% Compiled module: LOADCT.
% Compiled module: FILEPATH.
0- B-W LINEAR 14- STEPS 28- Hardcandy
1- BLUE/WHITE 15- STERN SPECIAL 29- Nature
2- GRN-RED-BLU-WHT 16- Haze 30- Ocean
3- RED TEMPERATURE 17- Blue - Pastel - R 31- Peppermint
4- BLUE/GREEN/RED/YE 18- Pastels 32- Plasma
5- STD GAMMA-II 19- Hue Sat Lightness 33- Blue-Red
6- PRISM 20- Hue Sat Lightness 34- Rainbow
7- RED-PURPLE 21- Hue Sat Value 1 35- Blue Waves
8- GREEN/WHITE LINEA 22- Hue Sat Value 2 36- Volcano
9- GRN/WHT EXPONENTI 23- Purple-Red + Stri 37- Waves
10- GREEN-PINK 24- Beach 38- Rainbow18
11- BLUE-RED 25- Mac Style 39- Rainbow + white
12- 16 LEVEL 26- Eos A 40- Rainbow + black
13- RAINBOW 27- Eos B
Enter table number: 13
% LOADCT: Loading table RAINBOW
IDL> xpalette
% Compiled module: XPALETTE.
% Compiled module: XREGISTERED.
% Compiled module: CW_FIELD.
% Compiled module: CW_BGROUP.
% Compiled module: CW_RGBSLIDER.
% Compiled module: CW_FSLIDER.
% Compiled module: CW_COLORSEL.
% Compiled module: CT_LUMINANCE.
% Compiled module: COLORMAP_APPLICABLE.
% Compiled module: XMANAGER.
% Compiled module: XLOADCT.
IDL> modifyct
% Compiled module: MODIFYCT.
% Variable is undefined: ITAB.
% Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
modifyct.pro
% $MAIN$
% Execution halted at: $MAIN$
any idea...
Regards
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79640 is a reply to message #79638] |
Thu, 15 March 2012 15:22  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
I think that you are not using the routine properly. You are missing the index. Did you read the documentation ?
TVLCT, r, g, b, /GET
ltab=45
MODIFYCT, ltab, 'my rainbow palette', r, g, b
PRINT, ltab
The palette will be stored in the index ltab. Next time you want to load the palette, you can do LOADCT, ltab
The magic is done !
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79641 is a reply to message #79640] |
Thu, 15 March 2012 15:18  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 3/15/12 3:52 PM, David L�pez wrote:
> On Mar 15, 5:15 pm, nata<bernat.puigdomen...@gmail.com> wrote:
>> Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
>>
>> After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
>>
>> Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
>>
>> Dale !
>> nata
>
> Thanks a Lot Nata...
> but now I have this problem
>
> % Compiled module: MODIFYCT.
> % Variable is undefined: ITAB.
> % Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
> modifyct.pro
> % $MAIN$
> % Execution halted at: $MAIN$
>
> Thanks a lot
Could you show the command that caused this error?
I have several other color tables files that I access with the FILE
keyword of [X]LOADCT and find this a quite nice way to store color tables.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79642 is a reply to message #79641] |
Thu, 15 March 2012 14:52  |
David López
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
On Mar 15, 5:15 pm, nata <bernat.puigdomen...@gmail.com> wrote:
> Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
>
> After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
>
> Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
>
> Dale !
> nata
Thanks a Lot Nata...
but now I have this problem
% Compiled module: MODIFYCT.
% Variable is undefined: ITAB.
% Error occurred at: MODIFYCT 83 /usr/local/itt/idl71/lib/
modifyct.pro
% $MAIN$
% Execution halted at: $MAIN$
Thanks a lot
|
|
|
Re: How to add modified color tables to IDL 7.1 [message #79643 is a reply to message #79642] |
Thu, 15 March 2012 14:15  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Modify your palette using XPALETTE. Then, you can retrieve the RGB values with TVLCT, r, g, b, /GET and create a SAV file with these values SAVE, FILENAME='myrainbowpalette.sav', r, g, b
After that, if you want to use these same colors again, you can restore the palette RESTORE, 'myrainbowpalette.sav' and set the colors using TVLCT, r, g, b
Another option is to modify the palette using MODIFYCT. You can create your own color-palette-table or overwrite the existing one (even if this is not a good idea). If you create your table, you will have to specify the file LOADCT, FILE=file, or MODIFYCT, FILE=file
Dale !
nata
|
|
|