From Christian.Heine at shell.com Tue Jan 10 03:39:21 2017 From: Christian.Heine at shell.com (Christian.Heine at shell.com) Date: Mon, 9 Jan 2017 16:39:21 +0000 Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction Message-ID: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> Hi list, happy 2017 first! I recently had a query from a colleague and just wanted to check with the list whether my reasoning/workflow is correct: When reconstructing features in GPlates which are coloured by "FeatureAge" the colouring will always be relative to reconstruction age. I am using my GTS2012 colourscale (https://bitbucket.org/chhei/gmt-cpts) but this equally applies to the default GPlates FeatureAge colouring. This means that a 50 Ma old feature at 40 Ma recon time will be be 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow darker as reconstruction time progresses towards present day. In order to keep the feature colour constant (e.g. keep a Jurassic chron "blue" over the course of the reconstruction) I have reverted to the following procedure described here: https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_features_by_absolute_age where I introduce a new attribute column for the "FROMAGE" but then use the ColorByProperty python script to colour the features for an absolute age (ie keep the colouring constant) using the age value from the new column. Is there a simpler way to do this? I guess one could also just point the ColorByProperty script to the "FROMAGE" here, thinking about it... Cheers, Christian -- Christian Heine, Ph.D. Upstream | Shell Intl. Exploration and Production B.V. Carel van Bylandtlaan 5 | C05 0.D15 2596 HP Den Haag, The Netherlands SIP +31 7 0377 4341 W: http://www.shell.com G: http://goo.gl/7GfvPZ From john.cannon at sydney.edu.au Wed Jan 11 14:47:06 2017 From: john.cannon at sydney.edu.au (John Cannon) Date: Wed, 11 Jan 2017 03:47:06 +0000 Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction In-Reply-To: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> References: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> Message-ID: <1E57973145EDFC41B1D69DE1192392280184AB1FEF@ex-mbx-pro-05> Hi Christian, That's correct - the colouring will always be relative to the reconstruction time. And thanks for providing your colouring tutorial :) > I guess one could also just point the ColorByProperty script to the "FROMAGE" here, thinking about it... Yes that works also. And is probably the easiest solution if you already have the ColorByProperty script. > Is there a simpler way to do this? This isn't the simplest, but another alternative is to provide the following script (using a similar procedure, to add the script, as covered in your tutorial)... import pygplates class AbsoluteAge: def __init__(self): pass def get_style(self, feature, style): absolute_age = feature.begin_time() style.colour = self.cfg['Palette'].get_color(pygplates.PaletteKey(absolute_age)) def get_config(self): self.cfg_dict = {} self.cfg_dict['Palette/type'] = 'Palette' return self.cfg_dict def set_config(self, config): self.cfg = config def register(): pygplates.Application().register_draw_style(AbsoluteAge()) ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs and spaces... as I just did a few moments ago :-) ... otherwise Python will fail to compile it (when GPlates launches) and it won't get registered. It's basically a minor modification to class FeatureAge in the existing "draw_style_demo.py" script that you can see in GPlates 1.5 (it's now stored inside the executable in GPlates 2.0 - so no longer visible). In the future we will take another look at this sort of thing when symbology is implemented/improved to see investigate easier ways to do this (ie, without having to write a Python script). Regards, John ________________________________________ From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] Sent: Tuesday, 10 January 2017 3:39 AM To: gplates-discuss at mailman.sydney.edu.au Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction Hi list, happy 2017 first! I recently had a query from a colleague and just wanted to check with the list whether my reasoning/workflow is correct: When reconstructing features in GPlates which are coloured by "FeatureAge" the colouring will always be relative to reconstruction age. I am using my GTS2012 colourscale (https://bitbucket.org/chhei/gmt-cpts) but this equally applies to the default GPlates FeatureAge colouring. This means that a 50 Ma old feature at 40 Ma recon time will be be 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow darker as reconstruction time progresses towards present day. In order to keep the feature colour constant (e.g. keep a Jurassic chron "blue" over the course of the reconstruction) I have reverted to the following procedure described here: https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_features_by_absolute_age where I introduce a new attribute column for the "FROMAGE" but then use the ColorByProperty python script to colour the features for an absolute age (ie keep the colouring constant) using the age value from the new column. Is there a simpler way to do this? I guess one could also just point the ColorByProperty script to the "FROMAGE" here, thinking about it... Cheers, Christian -- Christian Heine, Ph.D. Upstream | Shell Intl. Exploration and Production B.V. Carel van Bylandtlaan 5 | C05 0.D15 2596 HP Den Haag, The Netherlands SIP +31 7 0377 4341 W: http://www.shell.com G: http://goo.gl/7GfvPZ _______________________________________________ GPlates-discuss mailing list GPlates-discuss at mailman.sydney.edu.au http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss From Christian.Heine at shell.com Wed Jan 11 21:31:08 2017 From: Christian.Heine at shell.com (Christian.Heine at shell.com) Date: Wed, 11 Jan 2017 10:31:08 +0000 Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction In-Reply-To: <1E57973145EDFC41B1D69DE1192392280184AB1FEF@ex-mbx-pro-05> References: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> <1E57973145EDFC41B1D69DE1192392280184AB1FEF@ex-mbx-pro-05> Message-ID: <79A2F7156CC1D441B593C58CF6BECAD9AEEA6756@SEACMW-S-53401.europe.shell.com> Hi John, > That's correct - the colouring will always be relative to the > reconstruction time. And thanks for providing your colouring tutorial :) Most welcome! > > I guess one could also just point the ColorByProperty script to the > "FROMAGE" here, thinking about it... > > Yes that works also. And is probably the easiest solution if you already > have the ColorByProperty script. OK > > Is there a simpler way to do this? > > This isn't the simplest, but another alternative is to provide the > following script (using a similar procedure, to add the script, as > covered in your tutorial)... [snip] > ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs and > spaces... as I just did a few moments ago :-) ... haha, beginner's mistake ;-) > It's basically a minor modification to class FeatureAge in the existing > "draw_style_demo.py" script that you can see in GPlates 1.5 (it's now > stored inside the executable in GPlates 2.0 - so no longer visible). Great - can confirm that your script works (did check for the space/tabs though :-) ), the beauty is that now only needs the CPT to be loaded and not the age attribute specified. > In the future we will take another look at this sort of thing when > symbology is implemented/improved to see investigate easier ways to do > this (ie, without having to write a Python script). Yep, cool. One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? I was trying something out yesterday and couldn't get pygplates to work in the console. Thanks again, Christian > ________________________________________ > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on > behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > Sent: Tuesday, 10 January 2017 3:39 AM > To: gplates-discuss at mailman.sydney.edu.au > Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant > during reconstruction > > Hi list, > > happy 2017 first! > > I recently had a query from a colleague and just wanted to check with the > list whether my reasoning/workflow is correct: > > When reconstructing features in GPlates which are coloured by > "FeatureAge" the colouring will always be relative to reconstruction age. > I am using my GTS2012 colourscale (https://bitbucket.org/chhei/gmt-cpts) > but this equally applies to the default GPlates FeatureAge colouring. > This means that a 50 Ma old feature at 40 Ma recon time will be be > 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow > darker as reconstruction time progresses towards present day. > > In order to keep the feature colour constant (e.g. keep a Jurassic chron > "blue" over the course of the reconstruction) I have reverted to the > following procedure described here: > > https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_features_ > by_absolute_age > > where I introduce a new attribute column for the "FROMAGE" but then use > the ColorByProperty python script to colour the features for an absolute > age (ie keep the colouring constant) using the age value from the new > column. > > Is there a simpler way to do this? I guess one could also just point the > ColorByProperty script to the "FROMAGE" here, thinking about it... > > > Cheers, > Christian > > -- > Christian Heine, Ph.D. > Upstream | Shell Intl. Exploration and Production B.V. > Carel van Bylandtlaan 5 | C05 0.D15 > 2596 HP Den Haag, The Netherlands > > SIP +31 7 0377 4341 > W: http://www.shell.com > G: http://goo.gl/7GfvPZ > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss From john.cannon at sydney.edu.au Thu Jan 12 00:52:53 2017 From: john.cannon at sydney.edu.au (John Cannon) Date: Wed, 11 Jan 2017 13:52:53 +0000 Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction In-Reply-To: <79A2F7156CC1D441B593C58CF6BECAD9AEEA6756@SEACMW-S-53401.europe.shell.com> References: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> <1E57973145EDFC41B1D69DE1192392280184AB1FEF@ex-mbx-pro-05>, <79A2F7156CC1D441B593C58CF6BECAD9AEEA6756@SEACMW-S-53401.europe.shell.com> Message-ID: <1E57973145EDFC41B1D69DE1192392280184ABCFE9@ex-mbx-pro-05> Hi Christian, > One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? Yes that's still the case with GPlates 2.0. In other words, the official pyGPlates is not currently supported "inside" GPlates (eg, in the GPlates Python console). But it will be in the future (since it will be needed when Python plugins are supported) - although we don't currently have a good estimate of when that will be. /detailMode on/ It's a bit confusing because... Firstly, there's the new official pyGPlates API (programming interface)... http://www.gplates.org/docs/pygplates/index.html ...which does not currently work in GPlates (ie, can only be used in external Python scripts - by external I mean not running inside GPlates). But there's also an old, lesser known API that is currently used "inside" GPlates for colouring (like you see in ColorByProperty.py and that AbsoluteAge code snippet below)... http://www.gplates.org/user-manual/PythonAPIs.html ...but it will mostly get replaced by the official pyGPlates API when it is later supported "inside" GPlates. And this will affect the colouring scripts since they make calls to pyGPlates (and hence will be affected by the changed API). But since the old API is quite small we will probably also silently support it for backward compatibility (ie, so old colouring scripts don't bail). /detailMode off/ Regards, John ________________________________________ From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] Sent: Wednesday, 11 January 2017 9:31 PM To: gplates-discuss at mailman.sydney.edu.au Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction Hi John, > That's correct - the colouring will always be relative to the > reconstruction time. And thanks for providing your colouring tutorial :) Most welcome! > > I guess one could also just point the ColorByProperty script to the > "FROMAGE" here, thinking about it... > > Yes that works also. And is probably the easiest solution if you already > have the ColorByProperty script. OK > > Is there a simpler way to do this? > > This isn't the simplest, but another alternative is to provide the > following script (using a similar procedure, to add the script, as > covered in your tutorial)... [snip] > ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs and > spaces... as I just did a few moments ago :-) ... haha, beginner's mistake ;-) > It's basically a minor modification to class FeatureAge in the existing > "draw_style_demo.py" script that you can see in GPlates 1.5 (it's now > stored inside the executable in GPlates 2.0 - so no longer visible). Great - can confirm that your script works (did check for the space/tabs though :-) ), the beauty is that now only needs the CPT to be loaded and not the age attribute specified. > In the future we will take another look at this sort of thing when > symbology is implemented/improved to see investigate easier ways to do > this (ie, without having to write a Python script). Yep, cool. One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? I was trying something out yesterday and couldn't get pygplates to work in the console. Thanks again, Christian > ________________________________________ > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on > behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > Sent: Tuesday, 10 January 2017 3:39 AM > To: gplates-discuss at mailman.sydney.edu.au > Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant > during reconstruction > > Hi list, > > happy 2017 first! > > I recently had a query from a colleague and just wanted to check with the > list whether my reasoning/workflow is correct: > > When reconstructing features in GPlates which are coloured by > "FeatureAge" the colouring will always be relative to reconstruction age. > I am using my GTS2012 colourscale (https://bitbucket.org/chhei/gmt-cpts) > but this equally applies to the default GPlates FeatureAge colouring. > This means that a 50 Ma old feature at 40 Ma recon time will be be > 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow > darker as reconstruction time progresses towards present day. > > In order to keep the feature colour constant (e.g. keep a Jurassic chron > "blue" over the course of the reconstruction) I have reverted to the > following procedure described here: > > https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_features_ > by_absolute_age > > where I introduce a new attribute column for the "FROMAGE" but then use > the ColorByProperty python script to colour the features for an absolute > age (ie keep the colouring constant) using the age value from the new > column. > > Is there a simpler way to do this? I guess one could also just point the > ColorByProperty script to the "FROMAGE" here, thinking about it... > > > Cheers, > Christian > > -- > Christian Heine, Ph.D. > Upstream | Shell Intl. Exploration and Production B.V. > Carel van Bylandtlaan 5 | C05 0.D15 > 2596 HP Den Haag, The Netherlands > > SIP +31 7 0377 4341 > W: http://www.shell.com > G: http://goo.gl/7GfvPZ > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss _______________________________________________ GPlates-discuss mailing list GPlates-discuss at mailman.sydney.edu.au http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss From Christian.Heine at shell.com Thu Jan 12 01:44:28 2017 From: Christian.Heine at shell.com (Christian.Heine at shell.com) Date: Wed, 11 Jan 2017 14:44:28 +0000 Subject: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction In-Reply-To: <1E57973145EDFC41B1D69DE1192392280184ABCFE9@ex-mbx-pro-05> References: <79A2F7156CC1D441B593C58CF6BECAD9AEEA5B6A@SEACMW-S-53401.europe.shell.com> <1E57973145EDFC41B1D69DE1192392280184AB1FEF@ex-mbx-pro-05>, <79A2F7156CC1D441B593C58CF6BECAD9AEEA6756@SEACMW-S-53401.europe.shell.com> <1E57973145EDFC41B1D69DE1192392280184ABCFE9@ex-mbx-pro-05> Message-ID: <79A2F7156CC1D441B593C58CF6BECAD9AEEA6835@SEACMW-S-53401.europe.shell.com> Hi John, [snip] > /detailMode on/ > > Firstly, there's the new official pyGPlates API (programming > interface)... > > http://www.gplates.org/docs/pygplates/index.html > > ...which does not currently work in GPlates (ie, can only be used in > external Python scripts - by external I mean not running inside GPlates). OK, yes, understood. > But there's also an old, lesser known API that is currently used "inside" > GPlates for colouring (like you see in ColorByProperty.py and that > AbsoluteAge code snippet below)... > > http://www.gplates.org/user-manual/PythonAPIs.html > > ...but it will mostly get replaced by the official pyGPlates API when it > is later supported "inside" GPlates. And this will affect the colouring > scripts since they make calls to pyGPlates (and hence will be affected by > the changed API). But since the old API is quite small we will probably > also silently support it for backward compatibility (ie, so old colouring > scripts don't bail). Fantastic, this was what I was after! I'm just interested in the interacting/querying features and I was really puzzled yesterday when I couldn't get this working in the GPlates Python console. As I recalled from some years back, Michael and I coded up a simple time-bookmarking tool which was using that API. Mystery solved :-) Will contact you offlist for some other stuff in the next days. Many thanks for your help. Greetings, Christian > ________________________________________ > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on > behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > Sent: Wednesday, 11 January 2017 9:31 PM > To: gplates-discuss at mailman.sydney.edu.au > Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour > constant during reconstruction > > Hi John, > > > That's correct - the colouring will always be relative to the > > reconstruction time. And thanks for providing your colouring tutorial > > :) > > Most welcome! > > > > I guess one could also just point the ColorByProperty script to the > > "FROMAGE" here, thinking about it... > > > > Yes that works also. And is probably the easiest solution if you > > already have the ColorByProperty script. > > OK > > > > Is there a simpler way to do this? > > > > This isn't the simplest, but another alternative is to provide the > > following script (using a similar procedure, to add the script, as > > covered in your tutorial)... > > [snip] > > > ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs > > and spaces... as I just did a few moments ago :-) ... > > haha, beginner's mistake ;-) > > > It's basically a minor modification to class FeatureAge in the > > existing "draw_style_demo.py" script that you can see in GPlates 1.5 > > (it's now stored inside the executable in GPlates 2.0 - so no longer > visible). > > Great - can confirm that your script works (did check for the space/tabs > though :-) ), the beauty is that now only needs the CPT to be loaded and > not the age attribute specified. > > > In the future we will take another look at this sort of thing when > > symbology is implemented/improved to see investigate easier ways to do > > this (ie, without having to write a Python script). > > Yep, cool. > > One other question - the pygplates pages say that pygplates doesn't yet > work on the built-in GPlates Python console, is this still the case in > GPlates 2.0.x? I was trying something out yesterday and couldn't get > pygplates to work in the console. > > Thanks again, > Christian > > > > > ________________________________________ > > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] > > on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > > Sent: Tuesday, 10 January 2017 3:39 AM > > To: gplates-discuss at mailman.sydney.edu.au > > Subject: [GPlates-discuss] Colour by feature age: Keeping colour > > constant during reconstruction > > > > Hi list, > > > > happy 2017 first! > > > > I recently had a query from a colleague and just wanted to check with > > the list whether my reasoning/workflow is correct: > > > > When reconstructing features in GPlates which are coloured by > > "FeatureAge" the colouring will always be relative to reconstruction > age. > > I am using my GTS2012 colourscale > > (https://bitbucket.org/chhei/gmt-cpts) > > but this equally applies to the default GPlates FeatureAge colouring. > > This means that a 50 Ma old feature at 40 Ma recon time will be be > > 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow > > darker as reconstruction time progresses towards present day. > > > > In order to keep the feature colour constant (e.g. keep a Jurassic > > chron "blue" over the course of the reconstruction) I have reverted to > > the following procedure described here: > > > > https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_featur > > es_ > > by_absolute_age > > > > where I introduce a new attribute column for the "FROMAGE" but then > > use the ColorByProperty python script to colour the features for an > > absolute age (ie keep the colouring constant) using the age value from > > the new column. > > > > Is there a simpler way to do this? I guess one could also just point > > the ColorByProperty script to the "FROMAGE" here, thinking about it... > > > > > > Cheers, > > Christian > > > > -- > > Christian Heine, Ph.D. > > Upstream | Shell Intl. Exploration and Production B.V. > > Carel van Bylandtlaan 5 | C05 0.D15 > > 2596 HP Den Haag, The Netherlands > > > > SIP +31 7 0377 4341 > > W: http://www.shell.com > > G: http://goo.gl/7GfvPZ > > > > _______________________________________________ > > GPlates-discuss mailing list > > GPlates-discuss at mailman.sydney.edu.au > > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > > > > > _______________________________________________ > > GPlates-discuss mailing list > > GPlates-discuss at mailman.sydney.edu.au > > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss From bruce.eglington at usask.ca Tue Jan 17 05:34:39 2017 From: bruce.eglington at usask.ca (Eglington, Bruce) Date: Mon, 16 Jan 2017 18:34:39 +0000 Subject: [GPlates-discuss] CPT file with colour ramp Message-ID: <35598d4718214f5b979221495fec3207@Mail01.usask.ca> Hi I am having trouble getting a cpt file to work with colour ramps for a series of data where values range from negative to positive. Hopefully somebody can spot what I am doing incorrectly. The definitions are set up as: -035 204 000 000 -005 255 102 102 -005 255 255 051 -001 204 204 000 -001 102 255 102 +001 000 153 000 +001 102 102 255 +015 000 000 204 B 170 204 255 F 145 111 111 N 128 128 128 There should be four stages in the colour ramping (values from -35 to -5 (reds), -5 to -1 (yelloes), -1 to +1 (greens) and +1 to +15 (blues)) but none of the ramp values with positive values work i.e. I never see any blue symbols even though there are lots in the dataset. I have tried adding a leading + symbol (as shown above) and have also excluded it but neither has an impact. Any suggestions? Thanks Bruce Bruce Eglington (Ph.D.) Murray Pyke Chair Geological Sciences University of Saskatchewan 114 Science Place Saskatoon SK S7N 5E2 Canada bruce.eglington at usask.ca +1-306-966-5732 -----Original Message----- From: GPlates-discuss [mailto:gplates-discuss-bounces at mailman.sydney.edu.au] On Behalf Of John Cannon Sent: Wednesday, January 11, 2017 07:53 To: GPlates general discussion mailing list Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction Hi Christian, > One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? Yes that's still the case with GPlates 2.0. In other words, the official pyGPlates is not currently supported "inside" GPlates (eg, in the GPlates Python console). But it will be in the future (since it will be needed when Python plugins are supported) - although we don't currently have a good estimate of when that will be. /detailMode on/ It's a bit confusing because... Firstly, there's the new official pyGPlates API (programming interface)... http://www.gplates.org/docs/pygplates/index.html ...which does not currently work in GPlates (ie, can only be used in external Python scripts - by external I mean not running inside GPlates). But there's also an old, lesser known API that is currently used "inside" GPlates for colouring (like you see in ColorByProperty.py and that AbsoluteAge code snippet below)... http://www.gplates.org/user-manual/PythonAPIs.html ...but it will mostly get replaced by the official pyGPlates API when it is later supported "inside" GPlates. And this will affect the colouring scripts since they make calls to pyGPlates (and hence will be affected by the changed API). But since the old API is quite small we will probably also silently support it for backward compatibility (ie, so old colouring scripts don't bail). /detailMode off/ Regards, John ________________________________________ From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] Sent: Wednesday, 11 January 2017 9:31 PM To: gplates-discuss at mailman.sydney.edu.au Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction Hi John, > That's correct - the colouring will always be relative to the > reconstruction time. And thanks for providing your colouring tutorial > :) Most welcome! > > I guess one could also just point the ColorByProperty script to the > "FROMAGE" here, thinking about it... > > Yes that works also. And is probably the easiest solution if you > already have the ColorByProperty script. OK > > Is there a simpler way to do this? > > This isn't the simplest, but another alternative is to provide the > following script (using a similar procedure, to add the script, as > covered in your tutorial)... [snip] > ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs > and spaces... as I just did a few moments ago :-) ... haha, beginner's mistake ;-) > It's basically a minor modification to class FeatureAge in the > existing "draw_style_demo.py" script that you can see in GPlates 1.5 > (it's now stored inside the executable in GPlates 2.0 - so no longer visible). Great - can confirm that your script works (did check for the space/tabs though :-) ), the beauty is that now only needs the CPT to be loaded and not the age attribute specified. > In the future we will take another look at this sort of thing when > symbology is implemented/improved to see investigate easier ways to do > this (ie, without having to write a Python script). Yep, cool. One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? I was trying something out yesterday and couldn't get pygplates to work in the console. Thanks again, Christian > ________________________________________ > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] > on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > Sent: Tuesday, 10 January 2017 3:39 AM > To: gplates-discuss at mailman.sydney.edu.au > Subject: [GPlates-discuss] Colour by feature age: Keeping colour > constant during reconstruction > > Hi list, > > happy 2017 first! > > I recently had a query from a colleague and just wanted to check with > the list whether my reasoning/workflow is correct: > > When reconstructing features in GPlates which are coloured by > "FeatureAge" the colouring will always be relative to reconstruction age. > I am using my GTS2012 colourscale > (https://bitbucket.org/chhei/gmt-cpts) > but this equally applies to the default GPlates FeatureAge colouring. > This means that a 50 Ma old feature at 40 Ma recon time will be be > 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow > darker as reconstruction time progresses towards present day. > > In order to keep the feature colour constant (e.g. keep a Jurassic > chron "blue" over the course of the reconstruction) I have reverted to > the following procedure described here: > > https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_featur > es_ > by_absolute_age > > where I introduce a new attribute column for the "FROMAGE" but then > use the ColorByProperty python script to colour the features for an > absolute age (ie keep the colouring constant) using the age value from > the new column. > > Is there a simpler way to do this? I guess one could also just point > the ColorByProperty script to the "FROMAGE" here, thinking about it... > > > Cheers, > Christian > > -- > Christian Heine, Ph.D. > Upstream | Shell Intl. Exploration and Production B.V. > Carel van Bylandtlaan 5 | C05 0.D15 > 2596 HP Den Haag, The Netherlands > > SIP +31 7 0377 4341 > W: http://www.shell.com > G: http://goo.gl/7GfvPZ > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss _______________________________________________ GPlates-discuss mailing list GPlates-discuss at mailman.sydney.edu.au http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss _______________________________________________ GPlates-discuss mailing list GPlates-discuss at mailman.sydney.edu.au http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss From chhei at paleoearthlabs.org Tue Jan 17 06:22:00 2017 From: chhei at paleoearthlabs.org (Christian Heine) Date: Mon, 16 Jan 2017 20:22:00 +0100 Subject: [GPlates-discuss] CPT file with colour ramp In-Reply-To: <35598d4718214f5b979221495fec3207@Mail01.usask.ca> References: <35598d4718214f5b979221495fec3207@Mail01.usask.ca> Message-ID: <0FDA8DD0-9BD2-4D03-A89A-2FA9EB090910@paleoearthlabs.org> Hi Bruce, quick shot - I have not seen cpts with leading zeroes before - that might be a problem. Once I remove those, the world looks good - see screenshot. Revised cpt attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: test.cpt Type: application/octet-stream Size: 162 bytes Desc: not available URL: -------------- next part -------------- Cheers, Christian -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 1434311 bytes Desc: not available URL: -------------- next part -------------- On 16 Jan 2017, at 7:34 pm, Eglington, Bruce wrote: > Hi > I am having trouble getting a cpt file to work with colour ramps for a series of data where values range from negative to positive. Hopefully somebody can spot what I am doing incorrectly. The definitions are set up as: > > > > -035 204 000 000 -005 255 102 102 > -005 255 255 051 -001 204 204 000 > -001 102 255 102 +001 000 153 000 > +001 102 102 255 +015 000 000 204 > > B 170 204 255 > F 145 111 111 > N 128 128 128 > > > There should be four stages in the colour ramping (values from -35 to -5 (reds), -5 to -1 (yelloes), -1 to +1 (greens) and +1 to +15 (blues)) but none of the ramp values with positive values work i.e. I never see any blue symbols even though there are lots in the dataset. I have tried adding a leading + symbol (as shown above) and have also excluded it but neither has an impact. > > Any suggestions? > > Thanks > Bruce > > > > > > > > > > > > > Bruce Eglington (Ph.D.) > Murray Pyke Chair > Geological Sciences > University of Saskatchewan > 114 Science Place > Saskatoon > SK > S7N 5E2 > Canada > > bruce.eglington at usask.ca > +1-306-966-5732 > > > -----Original Message----- > From: GPlates-discuss [mailto:gplates-discuss-bounces at mailman.sydney.edu.au] On Behalf Of John Cannon > Sent: Wednesday, January 11, 2017 07:53 > To: GPlates general discussion mailing list > Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction > > Hi Christian, > >> One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? > > Yes that's still the case with GPlates 2.0. In other words, the official pyGPlates is not currently supported "inside" GPlates (eg, in the GPlates Python console). But it will be in the future (since it will be needed when Python plugins are supported) - although we don't currently have a good estimate of when that will be. > > > /detailMode on/ > > It's a bit confusing because... > > > Firstly, there's the new official pyGPlates API (programming interface)... > > http://www.gplates.org/docs/pygplates/index.html > > ...which does not currently work in GPlates (ie, can only be used in external Python scripts - by external I mean not running inside GPlates). > > > But there's also an old, lesser known API that is currently used "inside" GPlates for colouring (like you see in ColorByProperty.py and that AbsoluteAge code snippet below)... > > http://www.gplates.org/user-manual/PythonAPIs.html > > ...but it will mostly get replaced by the official pyGPlates API when it is later supported "inside" GPlates. And this will affect the colouring scripts since they make calls to pyGPlates (and hence will be affected by the changed API). But since the old API is quite small we will probably also silently support it for backward compatibility (ie, so old colouring scripts don't bail). > > /detailMode off/ > > > Regards, > John > > ________________________________________ > From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] > Sent: Wednesday, 11 January 2017 9:31 PM > To: gplates-discuss at mailman.sydney.edu.au > Subject: Re: [GPlates-discuss] Colour by feature age: Keeping colour constant during reconstruction > > Hi John, > >> That's correct - the colouring will always be relative to the >> reconstruction time. And thanks for providing your colouring tutorial >> :) > > Most welcome! > >>> I guess one could also just point the ColorByProperty script to the >> "FROMAGE" here, thinking about it... >> >> Yes that works also. And is probably the easiest solution if you >> already have the ColorByProperty script. > > OK > >>> Is there a simpler way to do this? >> >> This isn't the simplest, but another alternative is to provide the >> following script (using a similar procedure, to add the script, as >> covered in your tutorial)... > > [snip] > >> ...perhaps calling it "AbsoluteAge.py". And make sure not to mix tabs >> and spaces... as I just did a few moments ago :-) ... > > haha, beginner's mistake ;-) > >> It's basically a minor modification to class FeatureAge in the >> existing "draw_style_demo.py" script that you can see in GPlates 1.5 >> (it's now stored inside the executable in GPlates 2.0 - so no longer visible). > > Great - can confirm that your script works (did check for the space/tabs though :-) ), the beauty is that now only needs the CPT to be loaded and not the age attribute specified. > >> In the future we will take another look at this sort of thing when >> symbology is implemented/improved to see investigate easier ways to do >> this (ie, without having to write a Python script). > > Yep, cool. > > One other question - the pygplates pages say that pygplates doesn't yet work on the built-in GPlates Python console, is this still the case in GPlates 2.0.x? I was trying something out yesterday and couldn't get pygplates to work in the console. > > Thanks again, > Christian > > > >> ________________________________________ >> From: GPlates-discuss [gplates-discuss-bounces at mailman.sydney.edu.au] >> on behalf of Christian.Heine at shell.com [Christian.Heine at shell.com] >> Sent: Tuesday, 10 January 2017 3:39 AM >> To: gplates-discuss at mailman.sydney.edu.au >> Subject: [GPlates-discuss] Colour by feature age: Keeping colour >> constant during reconstruction >> >> Hi list, >> >> happy 2017 first! >> >> I recently had a query from a colleague and just wanted to check with >> the list whether my reasoning/workflow is correct: >> >> When reconstructing features in GPlates which are coloured by >> "FeatureAge" the colouring will always be relative to reconstruction age. >> I am using my GTS2012 colourscale >> (https://bitbucket.org/chhei/gmt-cpts) >> but this equally applies to the default GPlates FeatureAge colouring. >> This means that a 50 Ma old feature at 40 Ma recon time will be be >> 'yellowish' (using the GTS2012 cpt) as it is only 10 Myr old, but grow >> darker as reconstruction time progresses towards present day. >> >> In order to keep the feature colour constant (e.g. keep a Jurassic >> chron "blue" over the course of the reconstruction) I have reverted to >> the following procedure described here: >> >> https://wiki.paleoearthlabs.org/tectonicwaters:gplates_coloring_featur >> es_ >> by_absolute_age >> >> where I introduce a new attribute column for the "FROMAGE" but then >> use the ColorByProperty python script to colour the features for an >> absolute age (ie keep the colouring constant) using the age value from >> the new column. >> >> Is there a simpler way to do this? I guess one could also just point >> the ColorByProperty script to the "FROMAGE" here, thinking about it... >> >> >> Cheers, >> Christian >> >> -- >> Christian Heine, Ph.D. >> Upstream | Shell Intl. Exploration and Production B.V. >> Carel van Bylandtlaan 5 | C05 0.D15 >> 2596 HP Den Haag, The Netherlands >> >> SIP +31 7 0377 4341 >> W: http://www.shell.com >> G: http://goo.gl/7GfvPZ >> >> _______________________________________________ >> GPlates-discuss mailing list >> GPlates-discuss at mailman.sydney.edu.au >> http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss >> >> >> >> _______________________________________________ >> GPlates-discuss mailing list >> GPlates-discuss at mailman.sydney.edu.au >> http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > > _______________________________________________ > GPlates-discuss mailing list > GPlates-discuss at mailman.sydney.edu.au > http://mailman.sydney.edu.au/mailman/listinfo/gplates-discuss > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 872 bytes Desc: Message signed with OpenPGP using GPGMail URL: From bruce.eglington at usask.ca Tue Jan 17 07:59:51 2017 From: bruce.eglington at usask.ca (Eglington, Bruce) Date: Mon, 16 Jan 2017 20:59:51 +0000 Subject: [GPlates-discuss] CPT file with colour ramp In-Reply-To: <0FDA8DD0-9BD2-4D03-A89A-2FA9EB090910@paleoearthlabs.org> References: <35598d4718214f5b979221495fec3207@Mail01.usask.ca> <0FDA8DD0-9BD2-4D03-A89A-2FA9EB090910@paleoearthlabs.org> Message-ID: <8f4481b6ee78410caa167cf42e9e6f91@Mail01.usask.ca> Hi Christian Thanks for the suggestion. That solves it. Bruce Bruce Eglington (Ph.D.) Murray Pyke Chair Geological Sciences University of Saskatchewan 114 Science Place Saskatoon SK S7N 5E2 Canada bruce.eglington at usask.ca +1-306-966-5732 -----Original Message----- From: GPlates-discuss [mailto:gplates-discuss-bounces at mailman.sydney.edu.au] On Behalf Of Christian Heine Sent: Monday, January 16, 2017 13:22 To: GPlates general discussion mailing list Subject: Re: [GPlates-discuss] CPT file with colour ramp Hi Bruce, quick shot - I have not seen cpts with leading zeroes before - that might be a problem. Once I remove those, the world looks good - see screenshot. Revised cpt attached. From bruce.eglington at usask.ca Thu Jan 19 06:01:00 2017 From: bruce.eglington at usask.ca (Eglington, Bruce) Date: Wed, 18 Jan 2017 19:01:00 +0000 Subject: [GPlates-discuss] Possible minor bug relating to appearance age Message-ID: <954e220940184733b94234810061f4fc@Mail02.usask.ca> Hi I have just encountered what looks to be a bug in Gplates when representing data from a shapefile where the appearance age has a value of 999. In such situations, GPlates seems to assume that the age is not constrained and it gets set to a value of "past". It is not a big issue, especially as one seldom has values exactly equal to 999 but would be worth fixing for future releases. Cheers Bruce Bruce Eglington (Ph.D.) Murray Pyke Chair Geological Sciences University of Saskatchewan 114 Science Place Saskatoon SK S7N 5E2 Canada bruce.eglington at usask.ca +1-306-966-5732