Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bunch of JPEG, JPEG2000 GIF and PNG files that in theory could be used for some types of science analysis if there were temporal and spatial information in them.

Years ago, I had looked into trying to put some of the information as EXIF into the files, and I could enter timing information (DateTimeOriginal, SubsecTimeOriginal, ExposureTime), and even location of the main object of interest (SubjectArea), but it had some issues with distance to the object (SubjectDistance), as it stored it as a rational number (LONG/LONG), in meters, and so the farthest distance I could specify was about 0.014 AU.

Is anyone else aware of people embedding scientific metadata in common-use graphical formats?

And if so, can you point me towards the specification, project, or implementation?

(and other than GeoTIFF or the like ... we just don't use TIFF except for sending to museums; I'm interested in trying to put the critical metadata into the browse images that we're generating for the scientists)

share|cite|improve this question

closed as off topic by Qmechanic, Waffle's Crazy Peanut, Manishearth Dec 20 '12 at 11:40

Questions on Physics Stack Exchange are expected to relate to physics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Some of the SDSS images in JPEG format (for example those served by the SDSS DAS) have sections of the FITS headers of the corresponding data images embedded in them. I expect that other projects have done similar things, but I am not aware of any uniformity in how it is done.

For the most part, the image formats you list were really not intended for scientific data, and are not really suitable: if you have a choice, go for a format designed for science analysis rather than viewing, if science analysis is what you are doing.

If you want scientists to be able to see data on the web and do science with them, I suggest just using two formats: JPEG or whatever is most appropriate for viewing, and a proper data format for the data. Just make the JPEG a link to the science data if you like.

The dominant format in astronomy is FITS. It's an old, quirky, creaky format, but for images in astronomy there really is nothing better. It has an appropriate level of flexibility: it is capable of handling most astronomer's needs, and yet is uniform enough that software written for one project can generally properly interpret data written by another, either directly or with only modest effort. With some exceptions, at the moment not widely used, it is well documented: an average developer can be given a set of FITS files and the paper specification, and, in a reasonable time write a program that reads the files. It is very simple: a good developer could probably figure it out without the paper specification. A completely general reader is harder than one for a specific data set, but even so there are a plethora of such libraries out there, and at least plug-ins for most image processing and data analysis platforms, not just in astronomy but in general (Photoshop, MATLAB, Mathematica, etc.)

Because of its simplicity, it is also sometimes chosen for data preservation purposes. For example, the Vatican is using it in digitizing its library.

share|cite|improve this answer
The exceptions I refer to are compression and heaps. I personally find the growing use of the compression features of some libraries before they are properly documented foolishly short-sighted: I want a proper published standard. – EHN Jun 29 '11 at 0:15
Our primary storage is FITS, but I'm trying to make the browse images more useful, as not all uses require the full quality image, so it seems pointless for me to serve the larger files, or keep reduced FITS files when the browse images could serve multiple purposes. (eg, determining locations of solar active regions for high res telescopes to point ... they don't need 4096x4096 SDO/AIA lossless images for that.) – Joe Jun 29 '11 at 12:02
I did a little more digging today, and found that they're saving FITS cards in the JPEG comments ... or at least, they were, I haven't examined current images: – Joe Jul 6 '11 at 18:18
up vote 4 down vote accepted

After a bit of research, I believe the most robust solution that I could find is the 'Astronomy Visualization Metadata (AVM) standard for astronomical imagery', which uses Adobe's XMP standard to embed the metadata as RDF. XMP can be embedded in PDF, JPEG, JPEG 2000, GIF, PNG, TIFF, PS, EPS and audio and other non-image formats.

Other potential candidates are the 2006 IVOA note, 'Astronomical Outreach Imagery Metadata Tags for the Virtual Observatory, which covers how to insert metadata into JPEG images for use in outreach (museums, etc.), or to insert STC-X (the XML serialization of the Space Time Coordinate Metadata) in the JPEG headers, as referenced in 2008 on an IVOA mailing list.

update : In re-reading the AVM webpage, it seems that OIM is a precursor to AVM :

Previous AVM Versions

The IVOA note for Version 1.0 September 2006 (Retired December 2007, previously called Astronomical Outreach Metadata):

As such, I see little reason to leave that one as an option, as I'd assume it to be deprecated. (I've striken it from the earlier text)

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.