Shared posts

07 Mar 04:25

Sensitive detection of herbicide residues using field-amplified sample injection coupled with electrokinetic supercharging in flow-gated capillary electrophoresis

Anal. Methods, 2024, 16,2025-2032
DOI: 10.1039/D3AY01950K, Paper
Ying Gong, Maojun Gong
A low-conductivity sample buffer plug was electroosmotically injected, and then the FASI-EKS was conducted at a reversed voltage polarity. When the conentrated analyte region arrived at the capillary inlet edge, a normal voltage was applied for separations.
The content of this RSS Feed (c) The Royal Society of Chemistry
26 Sep 01:15

Run to Cadence Recordings

Amazon sells the whole “Run to Cadence” series put out by Documentary Recordings. These are recordings of 40 minute call-and-response chants by drill instructors and the grunts as they run in formation at 115 beats a minute.

I like to use my Airborne Rangers recording as a procrastination-buster when I have to tackle a disagreeable task around the house. I did not serve in the military, but when this tape plays in the background, I “fall in,” get pumped, and get the job done. The momentum stays a while.

[This is a Cool Tools Favorite from 2003]

13 Jun 18:45

Aeropress

by cc

This thing makes a really good cup of coffee fast. It’s well made, compact, and clean up is easy.

The AeroPress is 2.5 inch diameter syringe with a paper micro filter mounted across the bottom. It sits on top of a common coffee mug for brewing. You put in fine ground coffee measured with the included scoop. The scoop is about 1.5 times bigger than the ones you might get with regular a drip coffee maker. You put in hot water at the recommended 175 degrees which is cooler than other methods. You stir for 10 seconds and push the plunger in. Compressed air pushes the coffee out in 10 – 20 seconds. What you have in the cup is concentrated coffee. If you dilute it about 50/50 with hot water you get the strength of a regular cup of good coffee. It tastes great!

I have a French press, a vacuum brewer, various kinds of drip brewers, a good espresso machine, and I roast my own coffee. Since I got my AeroPress two months ago I favor it for all my coffee except espresso. It’s not fair to call the AeroPress concentrate espresso as the manufacture does but that’s a minor point.

[This is a Cool Tools Favorite from 2006]

Available from Sweet Maria's

08 Jan 18:48

The 5 Year Journal

I’ve been keeping journals of all kinds for more than a decade now. Travel journals, self-improvement journals, business journals, and daily journals that now form a foot-tall stack under the desk and a box of notebooks on the shelf. Yet none provide that comparative, year-to-year window into the days of life, or answer the question “How am I doing this year versus last year, or the year before that again?”

That’s where “The 5 Year Journal” comes in. It’s a hardbound, 266-page journal organized so that – as the title says – you can keep 5 years of brief entries in a single book. There are two days on each page, with five years of three-line entries for each day. Now three lines doesn’t sound like a lot, but it’s enough to capture the essence of the day. And there’s no reason you can’t keep other journals in parallel for lengthier meditations.

It’s a well thought-out book as well. There are logically placed sections for monthly goal planning, and for monthly, quarterly, and yearly reviews. Some of the Quarterly Questions might seem a bit whimsical (“My Favorite… Chuckle… Patience Builder… Tv Show”), but on the whole the author/designer Doreene Clement has exercised admirable self-restraint and thoughtfulness in putting the book together.

I’m looking forward to 2007 to see how things turned out this year.

-- Garry Ray

[This is a Cool Tools Favorite from 2005]

The 5 Year Journal ($32)

Available from Amazon

07 Dec 18:39

Tracking a Descent to Savagery with the Wolfram Language: Plotting Sentiment Analysis in Lord of the Flies

by Jon McLoone

Computation is no longer the preserve of science and engineering, so I thought I would share a simple computational literary analysis that I did with my daughter.

Shell Lord of the Flies

Hannah’s favorite book is Lord of the Flies by William Golding, and as part of a project she was doing, she wanted to find some quantitative information to support her critique.

Spoiler alert: for those who don’t know it, the book tells the story of a group of schoolboys shipwrecked on an island. Written as a reaction to The Coral Island, an optimistic and uplifting book with a similar initial premise, Lord of the Flies instead relates the boys’ descent into savagery once they are separated from societal influence.

The principle data that Hannah asked for was a timeline of the appearance of the characters. This is a pretty straightforward bit of counting. For a given character name, I can search the text for the positions it appears in, and while I am at it, label the data with Legended so that it looks nicer when plotted.

nameData[name_, label_] :=    Legended[First /@ StringPosition[$lotf, name, IgnoreCase -> True]/    StringLength[$lotf], label]; nameData[name_] := nameData[name, name];

The variable $lotf contains the text of the book (there is some discussion later about how to get that). By dividing the string position by the length of the book, I am rescaling the range to 0–1 to make alignment with later work easier. Now I simply create a Histogram of the data. I used a SmoothHistogram, as it looks nicer. The smoothing parameter of 0.06 is rather subjective, but gave this rather pleasingly smooth overview without squashing all the details.
characters = SmoothHistogram[{    nameData["Ralph"],    nameData["Jack"],    nameData["Beast", "The Beast"]}, 0.06, PlotStyle -> Thickness[0.01],   PlotRange -> {{0, 1}, All}, PlotLabel -> "Character appearances",   Ticks -> None]

Already we can see some of the narrative arc of the book. The protagonist, Ralph, makes an early appearance, closely followed by the antagonist, Jack. The nonexistent Beast appears as a minor character early in the book as the boys explore the island before becoming a major feature in the middle of the book, preceding Jack’s rise as Jack exploits fear of the Beast to take power. Ralph becomes significant again toward the end as the conflict between he and Jack reaches its peak.

But most of Hannah’s critique was about meaning, not plot, so we started talking about the tone of the book. To quantify this, we can use a simple machine learning classifier on the sentences and then do basic statistics on the result.

By breaking the text into sentences and then using the built-in sentiment analyzer, we can hunt out the sentence most likely to be a positive one.

MaximalBy[TextSentences[$lotf],   Classify["Sentiment", #, {"Probability", "Positive"}] &]

The classifier returns only "Positive", "Negative" and "Neutral" classes, so if we map those to numbers we can take a moving average to produce an average sentiment vector with a window of 500 sentences.

sentimentData =    Legended[MeanFilter[      ReplaceAll[       Classify["Sentiment", TextSentences[$lotf]] , {"Positive" -> 1,         "Negative" -> -1, "Neutral" | Indeterminate -> 0}], 500]*20,     "Sentiment"];

Putting that together with the character occurrences allows some interesting insights.

Lord of the Flies high-res

We can see that there is an early negative tone as the boys are shipwrecked, which quickly becomes positive as they explore the island and their newfound freedom. The tone becomes more neutral as concerns rise about the Beast, and turn negative as Jack rises to power. There is a brief period of positivity as Ralph returns to prominence before the book dives into bleak territory as everything goes bad (especially for Piggy).

Digital humanities is a growing field, and I think the relative ease with which the Wolfram Language can be applied to text analysis and other kinds of data science should help computation make useful contributions to many fields that were once considered entirely subjective.

Appendix: Notes on Data Preparation

Because I wanted to avoid needing to OCR my hard copy of the book, I used a digital copy. However, the data was corrupted by some page headers, artifacts of navigation hyperlinks and an index page. So, here is some rather dirty string pattern work to strip out those extraneous words and numbers to produce a clean string containing only narrative:

$lotf = StringReplace[    StringDelete[     StringReplace[      StringDrop[       StringDelete[        Import["http://<redacted>.txt"], {"Page " ~~ Shortest[___] ~~           " of 290\n\nGo Back\n\nFull Screen\n\nClose\n\nQuit",                           "Home Page\n\nTitle Page\n\nContents\n\n!!\n\n\"\"\n\n!\n\n\ \""}], 425],       "\n" -> " "], {"Home Page  " ~~ Shortest[___] ~~        "  Title Page  Contents", "!!  \"\"  !  \"    ", "\f"}],     "  " -> " "];

Appendix 2: Text Labels

This is the code for labeling the plot with key moments in the book:

sentenceLabel[{sentence_String, label_}] :=   Block[{pos =      Once[First[FirstPosition[TextSentences[$lotf], sentence]]]},   Callout[{pos/Length[TextSentences[$lotf]], sentimentData[[1, pos]]},     label, Appearance -> "Balloon"]]

eventLabels = ListPlot[sentenceLabel /@     {      {"As they watched, a flash of fire appeared at the root of one \ wisp, and then the smoke thickened.", "The fire"},            {"Only the beast lay still, a few yards from the sea.",        "Simon dies"},      {"Samneric were savages like the rest; Piggy was dead, and the \ conch smashed to powder.", "Piggy dies"},      {"\[OpenCurlyDoubleQuote]I\[CloseCurlyQuote]m chief then.\ \[CloseCurlyDoubleQuote]", "Ralph leads"},      {"We aren\[CloseCurlyQuote]t enough to keep the fire burning.\ \[CloseCurlyDoubleQuote]", "Ralph usurped"}}];

Appendix 3: Conch Shell Word Cloud Image

It doesn’t provide much insight, but the conch word cloud at the top of the article was generated with this code:

img = Import["http://pngimg.com/uploads/conch/conch_PNG18242.png"]; ImageMultiply[  Rasterize[   WordCloud[DeleteStopwords[$lotf], AlphaChannel[img], MaxItems -> 50,     WordSelectionFunction -> (StringLength[#] >= 4 &)],    ImageSize -> ImageDimensions[img]], ImageAdjust[img, {-0.7, 1.3}]]

Reference—conch shell: Source image from pngimg.com Creative Commons 4.0 BY-NC.

17 Sep 15:25

Imaging of living cells and zebrafish in vivo using a ratiometric fluorescent probe for hydrogen sulfide

Analyst, 2015, 140,7165-7169
DOI: 10.1039/C5AN00119F, Communication
Tianbao Liu, Jie Lin, Zhen Li, Lin Lin, Yuning Shen, Hailiang Zhu, Yong Qian
We have developed a novel colorimetric and ratiometric fluorescence probe for the selective and sensitive imaging of H2S in living cells and living zebrafish in vivo.
The content of this RSS Feed (c) The Royal Society of Chemistry
17 Jul 21:25

Dorkfood DSV Temperature Controller for Sous Vide

by mark

Works flawlessly, controlling temperature to one degree. Using it with my 25-year-old Proctor Slo-Cooker (Original cost $19). Best thing so far is 48-hour short ribs. Cooking them at 140 degrees for two whole days makes the best tasting beef dish I ever had. The meat is totally different texture than what a braise gives you and they still are pink on the inside.

It sure beats spending $400 for a sous vide water oven. I just set it up in the garage and let it go. I do use it with my vacuum food packer but you can use it with regular zip lock bags, (just remove the air using the archimedes principle).

-- Bruce Johnson

Dorkfood Sous-Vide Temperature Controller
$99