Sunday, September 30, 2012

IDL show line numbers

How to get the fancy viewer to show the line numbers is a bit tricky. Here's the link that gave me the answer:

https://www.exelisvis.com/language/en-US/UserCommunity/UserForums/forumid/27/postid/11936/scope/posts.aspx

IDL pause for debugging

IDL can be a royal pain sometimes, but the fact that it's a scripted language comes in handy when you have to debug. Aside from being able to just start typing in IDL commands right in the current focus if a proc hangs up, you can also set breakpoints and do stepping.

I never used the following info about doing it from the command line, but this has lots of useful features.

http://idlastro.gsfc.nasa.gov/idl_html_help/BREAKPOINT.html

Formatting strings in IDL

Just a quick dump of links that I searched to get a handle on IDL's syntax for formatting strings.

These two may have been the best pages, with examples that show the nearly but not quite C-like formatting methods and a nice table of the format codes:

http://idlastro.gsfc.nasa.gov/idl_html_help/C_printf-Style_Quoted_String_Format_Code.html

http://star.pst.qub.ac.uk/idl/Format_Codes.html

This one showed one example of how to print an array to a file with formatting:

http://www.cis.rit.edu/class/simg211/datao.html

For a beginner's guide, this page was surprisingly useless:

http://www.stsci.edu/hst/training/events/IDLTopics/SSD98IDL/IDL_dataio.html#Writing%20Formatted%20Data

Here's the whole damn manual:

http://www.astro.virginia.edu/class/oconnell/astr511/IDLresources/getting-started-IDL-v7.0.pdf

Monday, September 24, 2012

Muller Universal wrist brace

Even though this wrist brace was lame because of having a thumb hole on both sides, it has turned out to be most helpful for my ganglion cycst of the 2 or 3 I've tried since buying this one. Of course, it's not in the stores anymore, but I tracked it down. It turns out that the original wrist brace had a tag that said "B306". That is this Beige 306 brace:

http://www.medshopexpress.com/050016.html?utm_source=googlepepla&utm_medium=adwords&id=19655764808&utm_content=pla&gclid=COy8zvqTuLICFYTd4AodbAgA0g#

Also this one, although they don't show the beige:

http://www.ambercity.com/wrist-brace-w-splint-beige-osfm-306-74676306018.html

Here it is on Amazon:

http://www.amazon.com/Mueller-Wrsit-Brace-withsplIncht-Beige/dp/B001B7O12O/ref=sr_1_1?s=hpc&ie=UTF8&qid=1347868022&sr=1-1&keywords=mueller+wrist+brace+306

I only figured out recently that the metal bar inside was intended to be removable!

Splitting binary file in two

All answers to this question involved using unix. No surprise.

Early hunts for an answer to this question involved the "split" command. However, split seems to be geared for cutting files into evenly sized pieces only, and not a single arbitrarily placed cut.

That's okay, because "dd" is my new best buddy. It's loaded with arguments, all of which have a lovely archaic format, and can do any number of cuts anywhere. The version of this command that I will henceforth use until the grave is any variation of the following:

for first half:
dd bs=1st location after split count=1 if=infile of=outfile
for last half
dd bs=1st location after split skip=1 if=infile of=outfile

The main hints were found in this forum thread:

http://unix.stackexchange.com/questions/6852/best-way-to-remove-bytes-from-the-start-of-a-file

This other thread is nearly all above my head; neat shmott shtuff, but this where I first got a clue of the existence of dd. I wonder what xxd is?:

http://stackoverflow.com/questions/9451890/how-to-dump-part-of-binary-file

Saturday, September 22, 2012

Samsung F210 mp3 player can't read ID3 tags

Love the F210, but the MP3 player didn't recognize album or artist for most of the songs that I brought over from Lisa's iTunes.

After some research, mp3tag seemed the best option and least likely to contain malware. This forum thread seems to go over lots of different types of mp3 tag problems and their solutions: http://social.technet.microsoft.com/Forums/en/w7itpromedia/thread/0b284232-aaf4-4cd8-8fee-91b46e9acbd9

And here's where mp3tag comes from: http://www.mp3tag.de/en/

The most likely culprit seemed to be which ID3 tag format was being used (particularly since some files worked and some didn't. There is apparently an ID3v1 and an ID3v2, files can have either or both, and they're different enough from each other to be incompatible for some players.

Here's a different product that had changing the tag version built into its front panel: http://www.maniactools.com/soft/mp3tag/copy-id3v1-to-id3v2-or-id3v2-to-id3v1.shtml

Here's how to do it in mp3tag. The key is to set the tag save type in Options, then save the tags. In practice, it is often necessary to fiddle with the tags before they will be saved. Also, the default settings for the files on my little micro-SD card seems to have been "Read Only", so saving may not have been having an effect at first (although I didn't get any feedback saying that there was a problem). http://forums.mp3tag.de/lofiversion/index.php/t6727.html

So, it turns out that the version that I needed was version 2.3! There's also a version 2.4 and maybe other later ones. The plain version 2 or maybe it's version 2.2 could not be read by the F210. Most of the tags in Lisa's iTunes were 2.2, and many were noted by mp3tag as "Bad 2.2". There are also apparently three different flavors of 2.3, UTF-8, UTF-16, and ISO something. The player didn't seem to care between UTF-16 and ISO.

This forum thread had the 2.3 answer, but it was buried under a bunch of distracting stuff about FLAC version tags: http://androidforums.com/samsung-captivate/139592-samsung-player-doesnt-recognize-my-music-tags.html

This is just an interesting forum thread by a guy who tried a bunch of stuff to fix a problem only slightly related to mine: http://forums.mp3tag.de/lofiversion/index.php/t12455.html

Tuesday, September 11, 2012

Toyota Echo OBD2 P0301

Lisa's car started shuddering as if it was running on three cylinders. We got it home and I borrowed John's OBD2 ( or OBDII) data reader, and got back a P0301 error, misfile on Cylinder 1.

At Pep Boys to buy plugs and wires, I learned that the Echo does not have wires, but instead an ignition coil module for each spark plug!

Replaced the plugs, none of them seemed worse than the others, but they all showed great wear and were well more than double the prescribed gap.

That didn't fix it. Googled for a while to double check which cylinder was #1, and came across the duh idea to swap two ignition modules around and see if the problem follows the module. It did, so I went back to Pep Boys (despite reading warnings that aftermarket modules may not work due to not adhering to Toyota specs) and got the one module that they had in stock, and now the Echo is happy again. Also did some research into the viability for replacing the injectors or cleaning them, and even bought some cleaner but haven't used it yet.

My favorite links found:

A story about using the OBD2 reader: http://www.toyotanation.com/forum/132-9th-generation-2003-2008/369315-fixed-my-p0171-code-thanks-forum.html

A story about a guy with a Ford who got a P0301 error, but he had the bad brake booster problem that I had with the Pinto: http://www.rangerpowersports.com/forum/f10/p0174-p0302-p0301-vacuum-leak-254083.html

Some idiotic answers from ranndom people on the Internet about P0301: http://wiki.answers.com/Q/What_is_code_P0300_Random_Misfire_Detected_P0302_and_P0303_on_a_Toyota_Corolla_and_how_do_you_repair_it

A guy whose similar Echo cut out. I don't think that he got and answer here: http://www.toyotalexusforum.com/toyota-camry-club/5887-toyota-echo-2000-misfire.html

A case of a bad coil: http://www.toyotanation.com/forum/26-yaris-vitz-echo-forum/370063-testing-ignition-coils-2001-echo.html

The cylinder order: http://wiki.answers.com/Q/What_is_the_firing_order_for_a_Toyota_Echo_1.5_V4

The long story where a guy got replacement coils off the Internet and they turned out to be junk: http://www.justanswer.com/toyota/1je9q-2001-toyota-echo-cylinder-check-engine-light-on-cyl-misfire.html

Replacing the Fuel Injectors: I lost the history leading up to this drawing, but the page that I was on insisted that you had to remove the valve cover first. Looking at the engine, it doesn't seem as though that would be required, but here's te diagram: http://s3.amazonaws.com/2cp-images/question_images/9553/large.jpg?1309087734

This ehow seems to agree with me: http://www.ehow.com/how_7868615_replace-fuel-injectors-1zz-fe.html