Software

Where you can count more than 135 taxa

I already wrote about PolyCounter, this software that I like so much to count pollen and other objects within palynological slides. PolyCounter comes with 3 layers of 45 keys (i.e., taxa) each, so as to say a potential of 135 taxa to count. It’s a lot! But sometimes it’s not enough. For instance, it took me several months of counting to design and improve my template. The taxa are ordered in a meaningful way to me, ensuring a faster counting. The counterpart is that I want to always use the same template, and some rare or ephemeral taxa are not included. There is a solution for this. It’s actually a tip directly from Takeshi Nakagawa: just open a second PolyCounter! You now have a potential of 270 taxa! Of course pay attention to save your data in a different file, and when all your countings are done, simply merge your data together.

Posted by Benjamin in Software, 0 comments

Convert BP and BC/AD times

This Alfred workflow converts BP times (Before Present) to BC/AD years, and reversely. The BC times have to be given as negative years. The result is copied to the clipboard, and alternatively as “cal. BP” or “cal. BC” when holding the action modifier Alt.

Posted by Benjamin in Software, 0 comments

Calculate mean and error

I often need to calculate the mean and ± error of two numbers, like for instance of a radiocarbon date. Here is a workflow (and below the AppleScript it includes) to calculate these two parameters based on two numbers input in Alfred.

set FirstNumber to first word of q as integer
set SecondNumber to second word of q as integer

set NumbersAverage to (FirstNumber + SecondNumber) / 2 as integer
set NumbersError to (SecondNumber - FirstNumber) / 2 as integer

set q to NumbersAverage & "±" & NumbersError as text
Posted by Benjamin in Software, 0 comments

PolyCounter

PolyCounter is an amazing free software to count microfossils (or anything else) by Takeshi Nakagawa. It comes with a clean and intuitive user interface. You just need few minutes to get used to it and know how to set it. It provides counting alarms, real-time accumulation curve, and instant diagrams. Data are directly available in your directory as a csv file.

I strongly recommend it to whoever needs to analyze pollen samples!

Posted by Benjamin in Software, 0 comments

Clam Starter

Clam is one my favorite piece of software. Designed by Maarten Blaauw, it allows to draw age-depth model of stratigraphic cores, using the software R. It uses a csv file containing your radiocarbon dates’ results, stored in a specific folder. To avoid mistake and save time, I wrote an AppleScript to use with Alfred (my favorite Mac app!).

Continue reading →
Posted by Benjamin in Software, 0 comments

Make a so-called csv a real csv

When you create csv files from the same systems than those which are not able to properly open them, you might need afterward to clean it up. I often find myself annoyed by so-called csv files that are actually delimited by semicolons, and commas are used as decimal separators. Here is a code to first replace commas by periods, then replace semicolons by commas.

tell application "Finder" to set FileToEdit to selection as string
set AccessToFile to open for access file FileToEdit with write permission
set CSVContent to read file FileToEdit
to switchText from t to r instead of s
set d to text item delimiters
set text item delimiters to s
set t to t's text items
set text item delimiters to r
tell t to set t to item 1 & ({""} & rest)
set text item delimiters to d
t
end switchText
switchText from CSVContent to "." instead of ","
set FirstStepText to result
switchText from FirstStepText to "," instead of ";"
set TextToWrite to result
set eof of file FileToEdit to 0
write TextToWrite to AccessToFile
close access AccessToFile

Credit goes to member kai (http://macscripter.net/viewtopic.php?pid=41243#p41243).

Posted by Benjamin in Software, 0 comments

Excel – Plain text to tab-delimited

Excel on non-English systems can suffer a bad limitation, namely it’s inability to properly interpret the csv format (comma separated value). Here is a tiny AppleScript code to fix this problem. It parses plain text from the first column of any csv opened in Excel into a tab-delimited layout, likely to be saved as a native Excel file.

tell application "Microsoft Excel"
    text to columns (range "A:A" of active sheet of active workbook) with comma
end tell
Posted by Benjamin in Software, 0 comments