Add Factors to a Momocs Coo Object

This wasn’t documented anywhere (maybe it’s obvious?), but here is a short example using the included ‘bot’ dataset.

data(bot);
# Look at the existing factors, stored in bot@fac
a<-bot@fac;
# Add another arbitrary factor
a[2]<-a;
a[2]<-c(1:40);
names(a)[2]<-“number”;
# Put your new factors back into the object
a->bot@fac;
# Look at your data based on the new factor
panel(bot,cols=col.india(40)[bot@fac[,”number”]]);

 

 

Statistics In Techlog

Question: How do you get statistics on log values (variable values*) for a given well?  How about a given zone in that well?

Answer**: In Techlog 2013.2.0 (not 2011 as far as I could tell), you can do this with the Statistics tool.

One well:

  1. Menu->Data->Toolbox->Statistics
  2. Select a variable from one of the wells and move it to the “Data type assignment” pane with the “Variables >” button and click “Create”
  3. Drag a well from your Project Browser to the Input pane of the Workflow Manager (right side).
  4. Click the Statistics tab in the Workflow Manager (right side).
  5. Click the purple “Play” button to compute statistics for your selection.

One well with zones:

  1. Proceed to step 3, above.
  2. Open the Zonation pane in the Project Browser.
  3. Select the zones you want to calculate statistics for.
  4. Open the Zonation tab in the Workflow Manager.
  5. Click the icon for “Insert zones from the zonation dock window.”
  6. Go to step 4, above.

I hope this helps someone at least a little bit.

*”Variables” are what Techlog calls digital logs.  Each type of log is a different variable.
**Drawing somewhat from this knowledge base article

Geologic Figures Database, step 1

I hope to someday put together a tagged database of figures pulled from the geological literature that may be useful to others, primarily maps and stratigraphic columns.  For now, though, I am sharing an Evernote notebook to which I will be adding over time.  It can be accessed here:

https://www.evernote.com/pub/matthewbk/publicimages [EDIT: No longer. 2014-02-04]

Future plans include tagging the images (type of map, area covered, stratigraphic units) but I am not sure of the platform to use.  Tumblr, Blogger, or even Pinterest (in addition to the possibility of Drupal) are all possibilities at this point that will allow collaboration.

SedLog symbols in Windows 7, 64-bit

This one took me a couple days to figure out.  When trying to import new symbols into SedLog 3.0, I kept running into an error “Unable to read this file: <filepath.svg>.”  It turns out that the 64-bit version of Windows 7 is getting in the way somewhere.  

To solve this problem, you can download and run the installer again, but first do the following:

  1. right-click on the installer file (sedlog-3.0-setup.exe),
  2. select the “Compatibility” tab,
  3. check the box “Run this program in compatibility mode for:” and select “Windows XP (Service Pack 3),”
  4. check the box “Run this program as an administrator.”  

Run the installer.  You should now be able to create and import SVG graphics per the official instructions.

Additional note on the SVG graphics: in Adobe Illustrator CS6, you should reduce the size of the artboard so that it is the same size as (or only slightly lager than) the symbol graphic.  It also looks like the maximum size for an SVG image to fit the entire symbol is about 42×42 pixels, but to match the existing symbols I think 20×20 px is a good size..

“Improving” GPlates output with Automator and Applescript

When you export reconstructed shapefiles from GPlates, you get two options: either dump all the shapefiles into one (but then not include an attribute field that can be used to separate the input files, or dump each shapefile into a folder named for its input file.  Since I’ve been working with multiple input shapefiles, this results in multiple folders of output:

Folder_Top
--my_first_shapefile
----reconstruction.00Ma.dbf
----reconstruction.00Ma.prj
----reconstruction.00Ma.shp
----reconstruction.00Ma.shx
--my_second_shapefile
----reconstruction.00Ma.dbf
----reconstruction.00Ma.prj
----reconstruction.00Ma.shp
----reconstruction.00Ma.s
etc.

I would rather have this:

Folder_Top
–my_first_shapefile.dbf
–my_first_shapefile.prj
–my_first_shapefile.shp
–my_first_shapefile.shx
–my_second_shapefile.dbf
–my_second_shapefile.prj
–my_second_shapefile.shp
–my_second_shapefile.shx
etc.

The attached [email me if you need it, I need a reason to dig it up and share it again. 2014-02-18] Automator script (Mac only) takes whatever folders you input (e.g., my_first_shapefile and my_second_shapefile), renames the contents of each to match the folder name, and then moves all of these files to the parent of the input folders (e.g., Folder_Top).  It has a bit of applescript based on this post and this one.

Tested on: Mac OS X 10.6.8 (Snow Leopard)
Requires: Dispense Items Incrementally Automator action
Input: One or more folders, dragged onto script icon (can be modified in Automator to pop up a dialog box)
Released under: CRAPL
Download: rename files to folder name automator.zip
Installation: Unzip file.  I think you need ro run Automator, open the unzipped file, and then “Save As” to hook everything up to your system correctly.

 

 

Quick idea for keeping track of file name abbreviations

I like to keep my file names short for several reasons: to make it easier to see the whole name at a glance, to make saving new files simpler, to allow room for additional characters when exporting new versions from different applications, and to (yes, still) deal with applications that have a set limit on the number of characters they will read or write from a file name.  

This leads me to abbreviate, and since I often end up with a few dozen files in the same folder with a bunch of different abbreviation combinations, I’ve come up with this trick to make sure I don’t forget things: add a few empy folders (or files, if you wish) as a key at the top of your directory.  In OS X, you can put a space at the beginning of the file name to force it to the top; in Windows I think you need to use an underscore.  So finally, in an image that is worth more than all the words I’ve just put down, here is an example.

 

List of GPlates rotation files

My dissertation is on BIOgeography, I swear!  I’ve had a hard time finding plate tectonic reconstructions (rotation files, .rot or .grot) to use in GPlates (hopefully a post on that sometime soon), so I will try to add to this list as I learn more.

Global rotation files:

  • First, the main GPlates Download page.  Scroll down to the “Download GPlates-compatible data” section, which contains some of what is listed here.
  • GPlates official sample data was commented on here.
  • Earthbyte rotations go back to 140 Ma.
  • CalTech rotations (which may or may not be different from EarthByte) go back to 140 Ma. 
  • Seton et al. (2012) rotations go back to 200 Ma.
  • Golonka (2007) has global rotation data in the supporting online material for the Late Triassic-Early Jurassic.
  • Supporting data for Williams et al. (2012), available from an FTP link in the text, has a rotation file from 1100 Ma to 530 Ma based on “the model of all Rodinia described by Li et al. (2008)” (SupplementaryTutorial2.pdf, p. 5).

Regional rotation files:

  • Australia
    • A rotation file for Australia (~1100 Ma – 530 Ma) by Giles et al. (2003) is included in the Williams et al. (2012) supporting data, above. 
    • A rotation file for Australia (~1100 Ma – 530 Ma) by Henson et al. (2011) is included in the Williams et al. (2012) supporting data, above.
    • A rotation file for Australia (~1100 Ma – 530 Ma) by Li and Evans (2011) is included in the Williams et al. (2012) supporting data, above.