Apple Mail Rules Broken in Yosemite (OS X 10.10)

This has been bothering me since I upgraded to Yosemite earlier this summer.  I finally found an answer: turn on iCloud syncing for email.  I did not need do any if the file copying mentioned in the linked solution.

In case you’re wondering: No, I am not a rules fanatic, but one IMAP email account through my hosting company has an issue with spam.  I turned on Spam Assassin, which tags the junk, and then I use a rule to put those messages in the junk folder, just in case there was a false positive.

 

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.