[AstroPy] DATAMD5 calculation

Erik Bray embray at stsci.edu
Tue May 24 18:10:34 EDT 2011


On 05/24/2011 05:51 PM, Ole Streicher wrote:
> Hi Erik,
>
> (I didn't get your mail through the mailing list -- on purpose?)

Yes, that was a mistake; I meant to reply to the list.

> Am 24.05.2011 23:13, schrieb Erik Bray:
>> I don't think pyfits has anything built in for handling MD5 sums.  Is
>> there some particular standard this relates to, such that it would be a
>> good feature to add?
>
> Maybe. At least, I know this from the ESO pipelines that they add a
> DATAMD5 keyword to the primary header. And since this keyword is not
> prefixed with "HIERARCH ESO", I guessed that it is some standard.
> However, google dit not point me to more information.

I'll look into it...

>> At any rate, in the meantime you can use hashlib to generate a checksum
>> on hdu.data--no need to use any internal attributes:
>
> This is unfortunately not compatible to the files I already have (from
> an ESO pipeline).

Strange...  could it be that they're using the header plus the data for 
the MD5 sum?

Erik



More information about the AstroPy mailing list