Beispiel #1
0
def main():
        source_file = sys.argv[1]
        premisxml, premis_namespace, doc, premis = setup_xml(source_file)
        items       = pg.main()
        xml_info    = make_premis(source_file, items, premis, premis_namespace, premisxml)
        doc         = xml_info[0]
        premisxml   = xml_info[1]
        write_premis(doc, premisxml)
Beispiel #2
0
plt.ylim(27.99, 16.)
plt.xlim(-0.49, 3.49)
plt.subplots_adjust(wspace=0.)
plt.savefig(name+'/'+name+'_cmd.png', dpi=150, bbox_inches='tight')

#make pdf plots and save to file
plt.close('all')
ax0 = plt.subplot(221)
plotpdf(name, matchoutput[:,3], weights, 'Log_Age', matchoutput[:,3].min()*0.95, matchoutput[:,3].max()*1.05, fitlist[0], bdelta=0.1)
ax1 = plt.subplot(222)
plotpdf(name, matchoutput[:,0], weights, 'Av', -0.05, matchoutput[:,0].max()+0.05, fitlist[1], bdelta=0.05)
ax2 = plt.subplot(223)
plotpdf(name, matchoutput[:,4], weights, 'Log_Z', -0.2, 0.2, fitlist[3])
ax3 = plt.subplot(224)
plotmass(name, mass, weights, 'Log_M', fitlist[2], bdelta=0.05)
plt.savefig(name+'/'+name+'_pdf.png', dpi=150, bbox_inches='tight')

#make joint pdf plot
jointclusterpdfs(name, matchoutput, weights)

#make residual plot
pg.main(name)

#write fits table
write_fits.main(name)




Beispiel #3
0
import lxml.builder as builder
import uuid
import time
import sys
import subprocess
import os
from glob import glob
import pg
import hashlib 
from collections import OrderedDict


source_file = sys.argv[1]
global items
global revtmd
items = pg.main()
print items,'whatver'
global manifest
manifest = os.path.dirname(os.path.abspath(source_file)) + '/' + os.path.basename(source_file) + '_manifest.md5'

def hashlib_md5(filename, manifest):
   print filename
   print manifest
   m = hashlib.md5()
   with open(str(filename), 'rb') as f:
       while True:
           buf = f.read(2**20)
           if not buf:
               break
           m.update(buf)
   md5_output = m.hexdigest()