diff --git a/make_magic_plots.py b/make_magic_plots.py index ed9e4da3b..0936445d9 100755 --- a/make_magic_plots.py +++ b/make_magic_plots.py @@ -46,34 +46,31 @@ def main(): Srecs=pmag.get_dictitem(samps,'sample_azimuth','','F')# get all none blank sample orientations if len(Srecs)>0: crd='g' -# if 'magic_measurements.txt' in filelist: # start with measurement data -# print 'working on measurements data' -# data,file_type=pmag.magic_read('magic_measurements.txt') # read in data -# if loc == './': data=pmag.get_dictitem(data,'er_location_name','','T') # get all the blank location names from data file -# # looking for zeq_magic possibilities -# AFZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-AF-Z','has')# get all none blank method codes -# TZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-T-Z','has')# get all none blank method codes -# MZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-M-Z','has')# get all none blank method codes -# Drecs=pmag.get_dictitem(data,'measurement_dec','','F') # get all dec measurements -# Irecs=pmag.get_dictitem(data,'measurement_inc','','F') # get all dec measurements -# Mkeys=['measurement_magnitude','measurement_magn_moment','measurement_magn_volume','measurement_magn_mass'] -# for key in Mkeys: -# Mrecs=pmag.get_dictitem(data,key,'','F') # get intensity data -# if len(Mrecs)>0:break -# if len(AFZrecs)>0 or len(TZrecs)>0 or len(MZrecs)>0 and len(Drecs)>0 and len(Irecs)>0 and len(Mrecs)>0: # potential for stepwise demag curves -# print 'zeq_magic.py -fsp pmag_specimens.txt -sav -fmt '+fmt+' -crd '+crd -# os.system('zeq_magic.py -sav -fmt '+fmt+' -crd '+crd ) -# #pass -# # looking for thellier_magic possibilities -# if len(pmag.get_dictitem(data,'magic_method_codes','LP-PI-TRM','has'))>0: -# print 'thellier_magic.py -fsp pmag_specimens.txt -sav -fmt '+fmt -# os.system('thellier_magic.py -sav -fmt '+fmt) -# #pass -# # looking for hysteresis possibilities -# if len(pmag.get_dictitem(data,'magic_method_codes','LP-HYS','has'))>0: # find hyst experiments -# print 'quick_hyst.py -sav -fmt '+fmt -# os.system('quick_hyst.py -sav -fmt '+fmt) -# #pass + if 'magic_measurements.txt' in filelist: # start with measurement data + print 'working on measurements data' + data,file_type=pmag.magic_read('magic_measurements.txt') # read in data + if loc == './': data=pmag.get_dictitem(data,'er_location_name','','T') # get all the blank location names from data file + # looking for zeq_magic possibilities + AFZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-AF-Z','has')# get all none blank method codes + TZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-T-Z','has')# get all none blank method codes + MZrecs=pmag.get_dictitem(data,'magic_method_codes','LT-M-Z','has')# get all none blank method codes + Drecs=pmag.get_dictitem(data,'measurement_dec','','F') # get all dec measurements + Irecs=pmag.get_dictitem(data,'measurement_inc','','F') # get all dec measurements + Mkeys=['measurement_magnitude','measurement_magn_moment','measurement_magn_volume','measurement_magn_mass'] + for key in Mkeys: + Mrecs=pmag.get_dictitem(data,key,'','F') # get intensity data + if len(Mrecs)>0:break + if len(AFZrecs)>0 or len(TZrecs)>0 or len(MZrecs)>0 and len(Drecs)>0 and len(Irecs)>0 and len(Mrecs)>0: # potential for stepwise demag curves + print 'zeq_magic.py -fsp pmag_specimens.txt -sav -fmt '+fmt+' -crd '+crd + os.system('zeq_magic.py -sav -fmt '+fmt+' -crd '+crd ) + # looking for thellier_magic possibilities + if len(pmag.get_dictitem(data,'magic_method_codes','LP-PI-TRM','has'))>0: + print 'thellier_magic.py -fsp pmag_specimens.txt -sav -fmt '+fmt + os.system('thellier_magic.py -sav -fmt '+fmt) + # looking for hysteresis possibilities + if len(pmag.get_dictitem(data,'magic_method_codes','LP-HYS','has'))>0: # find hyst experiments + print 'quick_hyst.py -sav -fmt '+fmt + os.system('quick_hyst.py -sav -fmt '+fmt) if 'pmag_results.txt' in filelist: # start with measurement data data,file_type=pmag.magic_read('pmag_results.txt') # read in data print 'number of datapoints: ',len(data) @@ -109,8 +106,11 @@ def main(): if len(SiteDIs_x)>0: print 'eqarea_magic.py -sav -fmt '+fmt os.system('eqarea_magic.py -sav -fmt '+fmt) + print 'working on pmag_results VGP map' + VGPs=pmag.get_dictitem(SiteDIs,'vgp_lat',"",'F') # are there any VGPs? + if len(VGPs)>0: # YES! + os.system('vgpmap_magic.py -prj moll -res c -sym ro 5 -sav -fmt png') print 'working on pmag_results intensities' - os.system('magic_select.py -f pmag_results.txt -key data_type i T -F tmp.txt') os.system('magic_select.py -f tmp.txt -key average_int 0. has -F tmp1.txt') os.system("grab_magic_key.py -f tmp1.txt -key average_int | awk '{print $1*1e6}' >tmp2.txt") diff --git a/pmagplotlib.py b/pmagplotlib.py index 25eda3a88..7c790bcbf 100755 --- a/pmagplotlib.py +++ b/pmagplotlib.py @@ -2400,8 +2400,10 @@ def plotMAP(fignum,lats,lons,Opts): circles=numpy.arange(latmin-2.*Opts['padlat'],latmax+2.*Opts['padlat'],Opts['gridspace']) meridians=numpy.arange(lonmin-2.*Opts['padlon'],lonmax+2.*Opts['padlon'],Opts['gridspace']) if Opts['pltgrid']>=0: - m.drawparallels(circles,color='black',labels=plabels) - m.drawmeridians(meridians,color='black',labels=mlabels) + #m.drawparallels(circles,color='black',labels=plabels) + #m.drawmeridians(meridians,color='black',labels=mlabels) + m.drawparallels(circles,color='black') # skip the labels - they are ugly + m.drawmeridians(meridians,color='black') # skip the labels - they are ugly m.drawmapboundary() prn_name,symsize=0,5 if 'names' in Opts.keys()>0: diff --git a/vgpmap_magic.py b/vgpmap_magic.py index 29831a8fb..e2f986648 100755 --- a/vgpmap_magic.py +++ b/vgpmap_magic.py @@ -115,7 +115,9 @@ def main(): Results=pmag.get_dictitem(Results,'vgp_lat','','F') # get all non-blank latitudes Results=pmag.get_dictitem(Results,'vgp_lon','','F') # get all non-blank longitudes if coord!="":Results=pmag.get_dictitem(Results,'tilt_correction',coord,'T') # get specified coordinate system + location="" for rec in Results: + if rec['er_location_names'] not in location:location = location+':'+rec['er_location_names'] if 'average_age' in rec.keys() and rec['average_age']!="" and ages==1: dates.append(rec['average_age']) lat=float(rec['vgp_lat']) @@ -156,6 +158,7 @@ def main(): ppars.append(lons[-1]+90.) ppars.append(0.) Pars.append(ppars) + location=location.strip(':') Opts={'latmin':-90,'latmax':90,'lonmin':0.,'lonmax':360.,'lat_0':lat_0,'lon_0':lon_0,'proj':proj,'sym':'bs','symsize':3,'pltgrid':0,'res':res,'boundinglat':0.} Opts['details']={'coasts':1,'rivers':0, 'states':0, 'countries':0,'ocean':1,'fancy':fancy} pmagplotlib.plotMAP(FIG['map'],[90.],[0.],Opts) # make the base map with a blue triangle at the pole` @@ -187,12 +190,12 @@ def main(): if plot==0:pmagplotlib.drawFIGS(FIG) files={} for key in FIG.keys(): - files[key]='VGP_map'+'.'+fmt + files[key]='LO:_'+location+'_VGP_map.'+fmt if pmagplotlib.isServer: black = '#000000' purple = '#800080' titles={} - titles['eq']='VGP Map' + titles['eq']='LO:_'+location+'_VGP_map' FIG = pmagplotlib.addBorders(FIG,titles,black,purple) pmagplotlib.saveP(FIG,files) elif plot==0: