S_Walker
May 24 2011, 04:10 PM
QUOTE (elakdawalla @ May 23 2011, 11:15 PM)

Speaking of which, that data is now public (part of the last PDS release) and is much better in that format than the raw JPEG format, but no one has yet stepped forward to redo that awesome group effort version of the image....
Sorry if this is a newbie question, but is the IMG files on the latest PDS release 8 or 16-bit? I try using IMG2PNG with all the cassini calibration files in place, yet running N1652854565_1.IMG through IMG2PNG produces an 8-bit PNG file that is still loaded with cosmic ray hits and banding... I must be doing something wrong. I also downloaded N1652854565_1.LBL, but am unsure what to do with it.
Again, sorry for the noob questions...
Juramike
May 24 2011, 05:12 PM
If you use OPUS, are those already "scrubbed" and recalibrated?
S_Walker
May 24 2011, 05:46 PM
QUOTE (Juramike @ May 24 2011, 01:12 PM)

If you use OPUS, are those already "scrubbed" and recalibrated?
What is OPUS? But perhaps you are right, they could be already calibrated. I was hoping to get the raw 16-bit data; is there somewhere else besides here that I should look?:
http://pds-imaging.jpl.nasa.gov/search/search.html#Results
ugordan
May 24 2011, 05:55 PM
No online data archive that I know of keeps calibrated Cassini imagery. If there were, the data certainly wouldn't be stored in 8 bit format.
You're probably just getting a PNG dump of the uncalibrated raw data that was stored in 8bit LUT format in the IMG (file size about 1MB).
S_Walker
May 24 2011, 06:02 PM
QUOTE (ugordan @ May 24 2011, 12:55 PM)

No online data archive that I know of keeps calibrated Cassini imagery. If there were, the data certainly wouldn't be stored in 8 bit format.
You're probably just getting a PNG dump of the uncalibrated raw data that was stored in 8bit LUT format in the IMG (file size about 1MB).
Ok, that makes sense; N1652854565_1.IMG is definitely 1 MB. So am I simply looking in the wrong place? I'd love to have a go at the raw data for Enceladus and Titan. Really can't do much with the 8-bit data. I downloaded the data here:
http://pds-imaging.jpl.nasa.gov/data/cassi...815_1652951881/Sorry for the thread-jack.
Bjorn Jonsson
May 24 2011, 06:08 PM
QUOTE (S_Walker @ May 24 2011, 04:10 PM)

Sorry if this is a newbie question, but is the IMG files on the latest PDS release 8 or 16-bit? I try using IMG2PNG with all the cassini calibration files in place, yet running N1652854565_1.IMG through IMG2PNG produces an 8-bit PNG file that is still loaded with cosmic ray hits and banding... I must be doing something wrong. I also downloaded N1652854565_1.LBL, but am unsure what to do with it.
Again, sorry for the noob questions...
Calibrated Cassini PNG image files output by IMG2PNG are always 16 bit regardless of the bit depth of the source images. Do you get any warning about not finding the Cassini calibration files when you start IMG2PNG?
S_Walker
May 24 2011, 06:15 PM
QUOTE (Bjorn Jonsson @ May 24 2011, 02:08 PM)

Calibrated Cassini PNG image files output by IMG2PNG are always 16 bit regardless of the bit depth of the source images. Do you get any warning about not finding the Cassini calibration files when you start IMG2PNG?
Not sure; I can only run the program by dragging and dropping the file directly into IMG2PNG. It opens and closes far too fast for me to read what it's doing. If I simply double-click img2png.exe (or img2png_new.exe) it opens and closes in a fraction of a second on my win7 machine. Any suggestions on how to open it so I can type commands?
machi
May 24 2011, 07:29 PM
It's possible via start menu, possibly (I don't know exactly, because I have czech version) in this order: start menu -> all programs -> accessories
Then you must find this icon
elakdawalla
May 24 2011, 07:47 PM
QUOTE (S_Walker @ May 24 2011, 10:15 AM)

Not sure; I can only run the program by dragging and dropping the file directly into IMG2PNG. It opens and closes far too fast for me to read what it's doing. If I simply double-click img2png.exe (or img2png_new.exe) it opens and closes in a fraction of a second on my win7 machine. Any suggestions on how to open it so I can type commands?
IMG2PNG is a command-line program. You have to run it from a command prompt window (Start > All Programs > Accessories > Command Prompt) in order to access its various switches and do calibration. There's limited documentation on Bjorn's website -- go to
http://www.mmedia.is/bjj/utils/img2png/ and skip down to the heading that says "How to use". To calibrate Cassini images, you'll need to follow the instructions in the section just above that. I was able to figure out how to do this from Bjorn's instructions on that page. I know Bjorn has it in his head to eventually write more thorough documentation, but that is one of the least fun things for a programmer to do, especially if English is not your first language!
By the way, calibration will never fix cosmic ray hits. It will only fix systematic, predictable issues like dark current, flat field, etc.
Bjorn Jonsson
May 24 2011, 07:54 PM
I have 'moved' this discussion to private email correspondence and will probably be posting a summary here once the issue is resolved.
As Emily mentioned, the plan is to improve the documentation but yes, it's not exactly fun and also I was too busy finishing the Voyager 1 Jupiter approach movie (and now I'm working on a global DEM of Enceladus that is more fun too than writing manuals ;-).
S_Walker
May 24 2011, 09:26 PM
Thanks everyone for the help. It seems the images in question are indeed 8-bit png, if I'm reading the actions correctly.
Click to view attachment
Bjorn Jonsson
May 24 2011, 10:14 PM
Correct, the input images are 8 bit. But there's one important thing I forgot to mention, "-r". You need to include this when running img2png to get it to calibrate the input files. Like this:
img2png *.img -r
machi
May 24 2011, 10:25 PM
Original image from Cassini's ISS can be 8-bit, but if you use img2png with calibration, than output is 16 bit png. Without calibration procedure is output 8 bit png when original is 8 bit image, or 16 bit png, when original is 12 bit image.
BTW, I tried new user-specified calibration procedure on old Voyager images.
It looks, that img2png accept well my calibration files, but new version can't read and convert imq files (old version has no problems with them).
S_Walker
May 25 2011, 01:39 PM
Thanks everyone for the help. Works great now.
Emily, I realize cosmic ray hits wouldn't go away with calibration; I'm so used to my own deep-sky imaging where multiple sub exposures are combined to both increase the signal, as well as average out CR hits; same goes for my own planetary images taken with my camera and telescope. Not as used to putting planet images together with single exposures.
I was hoping the faint "venetian blind" artifacts would be removed with calibration (horizontal bands that are barely above the background counts), but alas, it's not to be.
ugordan
May 25 2011, 01:44 PM
QUOTE (S_Walker @ May 25 2011, 03:39 PM)

I was hoping the faint "venetian blind" artifacts would be removed with calibration (horizontal bands that are barely above the background counts), but alas, it's not to be.
Yeah, the 2Hz banding is hard to remove as it's not predictable. I don't think even the imaging team has a good solution to this. Basically involves advanced filtering of the image (helps if you have "black" areas around targets of interest) and is therefore not part of the standard calibration procedure.
Bjorn Jonsson
May 26 2011, 12:57 AM
QUOTE (machi @ May 24 2011, 10:25 PM)

BTW, I tried new user-specified calibration procedure on old Voyager images.
It looks, that img2png accept well my calibration files, but new version can't read and convert imq files (old version has no problems with them).
That's weird, converting imq files works perfectly on my end, both with and without a calibration file. Are you using the most recent beta version? If yes (or if the most recent version does not work either) please post the error messages (if any) that appear plus a screenshot similar the the one posted by S_Walker at the top of this page (or, using copy-paste, the text from the command prompt window).
Juramike
May 26 2011, 02:32 AM
OK so...
New img2png programs unzipped - check
Cassini calib "Index of /volumes/COISS_0011/CALIB" calib.tar.gz unzipped and put in C:\\ directory - check (did I need to use the V2 version instead?)
moved mottlemap_hack.img into c:\calib\dustring folder - check
put img file and lbl file in same folder as img2png_new.exe - check
command script run - looks same as above - check (using -r option):
Click to view attachmentbut png file is jet black (N1652854565_1.IMG):
Click to view attachmentRan on another file (W1652951881_1.IMG) got noisy picture:
Click to view attachmentDid run OK on Galileo image.
Did I mess up the Cassini calibration files somehow?
(These are both coming out as 16-bit PNG's)
Juramike
May 26 2011, 11:13 AM
Part II:
Looked at log files. Needed to download instead the "2011_v2" volume instead. Did that. Modified the ".ini" file to point to the nested calibration files".
Tried it again, got same result as above.
Screenshot of log files show that the "c:\coiss_0011_v2\calib\offset\nacfm_so_p5.img" filesize is wrong (also WAC version)? The files show in my c:coiss_011_v2\calib\offset" directory as an 8K file.
Click to view attachment
Bjorn Jonsson
May 26 2011, 12:15 PM
I wonder if the calibration volume didn't get decompressed correctly. If you use WinZip to decompress you have to be careful (I don't think this has changed in recent WinZip versions). I don't know about different decompression programs. See
this message for details.
Juramike
May 26 2011, 01:49 PM
Thanks! I'll try that this evening! I used the WinZip defaults when I unpacked the calibration data.
(To turn off the TAR file smart CR/LF conversion it is in the WinZip "Options/configuration/Miscellaneous/other" box.)
-Mike
machi
May 26 2011, 01:57 PM
QUOTE (Bjorn Jonsson @ May 26 2011, 02:57 AM)

That's weird, converting imq files works perfectly on my end, both with and without a calibration file. Are you using the most recent beta version? If yes (or if the most recent version does not work either) please post the error messages (if any) that appear plus a screenshot similar the the one posted by S_Walker at the top of this page (or, using copy-paste, the text from the command prompt window).
Here it is.
Bjorn Jonsson
May 26 2011, 06:11 PM
The issue with the IMQ files has now been fixed and I have uploaded a new version.
The problem was that the IMQ files have at least two different header 'variants' and I hadn't noticed this. The new version checks the headers more carefully than the old version does (this is to avoid misidentifying some files). It didn't recognize the Voyager Neptune headers but in contrast, e.g. Voyager Jupiter was OK. I don't think there are more variants of the IMQ file headers but cannot rule it out completely.
Juramike
May 27 2011, 02:32 AM
Awesome! It now works for me! Whoo-hoo!
(Bwa-ha-ha!)
machi
May 27 2011, 05:19 PM
It looks, that it's now working fine. Thank you Björn!
Bjorn Jonsson
Jun 18 2011, 12:39 AM
The IMG2PNG beta version discussed in recent messages (in particular
here) has now become an 'official' version. There are no significant changes from recent versions of the beta so it may not be necessary to upgrade it. In contrast, I recommend this new version of img2png for anyone using the old version, especially if there have been any hints of problems.
See
http://www.mmedia.is/bjj/utils/img2png for more information.
Bjorn Jonsson
Mar 16 2012, 11:40 AM
A new version of IMG2PNG is now available that incorparates several bug fixes from the past several weeks/months (some of these bug fixes were available in 'interim' versions of IMG2PNG). The bugs were mainly in the conversion of IMG files containing floating point data. In particular the bugs affected the conversion of Messenger orbital data (fixed several months ago), Rosetta Osiris data (fixed a few months ago) and LROC and HiRise DTMs (fixed recently). More files containing floating point data were probably affected. There is also a new command line parameter, -fstretch (actually it was added several months ago when I made some Rosetta-related fixes).
As usual, IMG2PNG is available
here.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.