development

As previously promised I’ve updated the Myriad samples with a concurrent demo that more or less follows the same workflow as the 60 day technical review video. Included in the project for your convenience is a pre-trained machine learning model that’s learned to recognize indications of structural damage in C-scan maps. Although I originally trained it on ultrasonic sensor data, it did show some promise when I tried it out with microwave and X-ray data.

You’d most likely want to train it a bit more on data representative of your inspection to get the best results.

It’s a little amazing to me that ~250 lines of Java gets you a concurrent fault-tolerant damage detection app, but that’s very much courtesy the very excellent Akka framework. Well worth a look for your next project!

Just in case anyone else has had any trouble tracking down details and documentation for Cisco Configuration Engine and its support for Velocity dynamic templates, here’s a quick rundown of what I’ve been able to glean so far.

If you’d rather use Velocity templates instead of CCE’s format, it’s version 1.4.

Velocity calls to the internal LDAP server are through the $!{dsobj.getValue("name of attribute")} as demonstrated in this post.

Both the “legacy” (.cfgtpl) and Velocity templates can make calls to external Javascript courtesy the standard Java 6 scripting engine.

The legacy directive is #call /path/to/script.js .

I *think* the Velocity directive is $!{ds("/path/to/script.js", "arg1,arg2,arg3")}, where the first argument is (obviously) the full path to the script and the second is a comma-delimited list of arguments for the script. The second argument is split on commas and a global object arguments is available in the engine’s runtime environment.

I’ve been playing with Quandl’sPython API for a weekend or two, and I have to say it’s been great. You know when you hear the word “API” and you mentally picture a few days of wading through Javadocs and wiki diving? This isn’t that. It takes all of a second to get something going.

The current version of the weather station data from the National Climatic Data Center is fairly straightforward to read with Python and pandas, but the “legacy” file format as used on the old NNDC site and elsewhere is a bit more work. So in case it’s useful here’s a bit of code that I’ve had some luck with; just call the read_ncdc function to get a slightly cleaned up pandas DataFrame for your number-crunching pleasure.

Lately at work I’ve been doing a fair amount of factorial experiments with the excellent pyDOE package: pyDOE generates the full factorial design matrix, I use a “templated” input file to generate every combination of conditions and run each input through LAMMPS or whatever else I’m running at the time. Followed by many regular expressions and pandas sessions for data analysis, but that’s a story for another day.

While I was at it I noticed that while Python had its pyDOE (and similar functionality exists for Octave, MATLAB, R, etc.) I couldn’t find anything similar for Java. So with that in mind I cobbled something together and put it up on GitHub. If none of this really makes any sense yet, have a look at the demo app – given a list of conditions and the values they can take, it spits out a list of every possible combination of those conditions.

We’re gearing up for a field test of NDIToolbox which will include a long-term validation test where NDIToolbox will sit unattended and analyze NDI data as the inspection completes. I needed to have a dead-simple way to generate a PDF report of the analysis, and whipped up a simple little report module courtesy ReportLab and PyPdf. It’s short and simple enough that I’m posting it here in case anyone needs something similar, or you can go straight to the source.

Usage is hopefully straightforward: create a report, create a section, add content to section, add to report, repeat. The report functional tests have an example, and here’s what the output looks like: test_report.

If you haven’t updated NDIToolbox since last time, it’s worth doing it now. Here’s where we are today.

Better support for UTWin data files, including preliminary support for compressed waveforms. That last one’s still highly experimental but let me know if it works for you; I don’t have access to a lot of sample data files for testing.

Squashed bugs, which includes better handling of memory errors running a plugin.

(Developers) A new report module which provides a quick-and-easy way of generating simple PDF reports.

Source code has already been updated, binaries will follow shortly. I’ll have more to say on the report module in a later post.