; docformat = 'rst' ; ; NAME: ; ssoddPlotDB ; PURPOSE: ; Generate the figures for the whole SSODD: Mass vs density, mass ; vs macroporosity, .... ; ;+ ; :Description: ; Generate the figures for the whole SSODD: Mass vs density, mass ; vs macroporosity, .... ; ; :Categories: ; Database, SSODD, Graphics ; ; :Params: ; cwd: in, required, type=string ; Path to drop database files on output ; ; :Keywords: ; VERBOSE: in, optional, type=boolean, default=0 ; Trigger dialog with user ; ; :Examples: ; ; :Uses: ; inidIDL, ssoddLoadConfig, ssoddGetDB, ssoddGetLink ; :Author: ; B.Carry (IMCCE) ; ; :History: ; Change History:: ; Written in September 2014, B. Carry (IMCCE) ;- pro ssoddPlotDB, cwd, ssodd=ssodd, config=config, verbose=verbose ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- I -- Initialization And Input Verification -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; COMPILE_OPT hidden ;--I.1-- Check Output Location -------------------------------------------------- if not keyword_set(cwd) then begin message, /IOERROR, 'Usage: ssoddPlotDB, cwd [, config=, /VERBOSE]' endif else begin if ~file_test(cwd,/dir) then file_mkdir, cwd endelse ;--I.2-- Set IDL to Local Working Environment ----------------------------------- ;--I.2.1-- SSODD Root Configuration if not keyword_set(SSODD) then begin if not keyword_set(CONFIG) then begin config = initIDL(/CATALOG) endif SSODD = config.ssodd endif ;--I.2.2-- SSODD Graphics Configuration ssoddConf=ssoddLoadConfig(ssodd.conf) ;--I.3-- Verbose Option --------------------------------------------------------- if keyword_set(verbose) then verbose=1 $ else verbose=0 if keyword_set(verbose) then print, ' SSODD -- Initialization' ;--I.4-- Define Diameter Ranges ------------------------------------------------- diamCut = [0, ssoddConf.setup.db.diam, 1e9 ] nbDiamCut = n_elements(diamCut) diamRad = 0.5*exp(findgen(nbDiamCut)/2.5) ;--I.5-- Define Threshold on Density Precision ---------------------------------- densCut = [ssoddConf.setup.db.dens, 1e9 ] nbDens = n_elements(densCut) ;/ maxCuts = [12 , 7.5 , 7.0 ] ;\ error=0 & densCut=10. & maxDens = maxCuts(0) & colors=[9.75, 83.0] & key=1 & keyMet=0 ;\; error=0 & densCut=.50 & maxDens = maxCuts(0) & colors=[9.75, 83.0] & key=0 & keyMet=0 ;\ error=0 & densCut=.20 & maxDens = maxCuts(0) & colors=[9.75, 83.0] & key=1 & keyMet=0 ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- II -- Read and Sort SSODD -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--II.1-- SSODD Main Table ------------------------------------------------------- db = ssoddGetDB( ssodd=cwd+'ssodd.dat', /DUMP ) ;--II.2-- SSO - Meteorite Links -------------------------------------------------- link = ssoddGetLink(ssodd=ssodd.link) ;--II.3- SSO Populations -------------------------------------------------------- pop = ssoddConf.pop nbPop = n_elements(pop) ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- III -- Figure 1 - Mass -vs- Density -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--III.1-- Density Selection ------------------------------------------------------ if keyword_set(verbose) then print, ' SSODD -- Figure 1: Mass -vs- Density' for kDens=0, nbDens-1 do begin ;--III.1.1-- FileName if kDens eq nbDens-1 then nameCut='All' $ else nameCut= string( 100*densCut(kDens), format='(I03)') ;--III.1.2-- EPS Device Configuration set_plot, 'PS' device, xsize=18, ysize=12 device, /COLOR, bits_per_pixel=8 device, filename=cwd+'figures/SSODD-Mass-vs-Density'+nameCut+'.eps' device, encapsulated = 1 device, /TIMES, FONT_SIZE=14 !P.FONT = 0 ;--III.1.3-- Plot Area Configuration plot, /YLOG, db.dens.val, db.mass.val, /nodata, $ psym=3, xst=1, yst=1, $ ytickint=1, yminor=5, YR=[1e11, 1e23], $ ytickname=[' ', '10!U12',' ', '10!U14',' ', '10!U16',' ', '10!U18',' ', '10!U20',' ', '10!U22', ' '], $ xtickint=2, xminor=4, XR=[0,12], $ xtitle="Density (g/cc)", $ ; xtitle="Density (10!U-3!N kg.m!U-3!N)", $ ytitle="Mass (kg)", $ charsize=0.6, $ /DEVICE, position=[1100,800, 17700, 11800] ;--III.2-- Diameter Selection ----------------------------------------------------- for kDiam=nbDiamCut-1, 1, -1 do begin ;--III.3-- Population Selection --------------------------------------------------- for kPop=0, nbPop-1 do begin ;print, pop(kPop).id ;--III.3.1-- Local Set of Type/Class and Size --------------------------------------- if densCut(kDens) eq 0.20 then begin if strcmp(pop(kPop).class,'*',1) then begin loc = where( (db.diam.val le diamCut(kDiam) and db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ (db.dens.unc+db.dens.val le 8.0) and $ strcmp( db.type, pop(kPop).type), nbLoc ) endif else begin loc = where( (db.diam.val le diamCut(kDiam) and db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ (db.dens.unc+db.dens.val le 8.0) and $ strcmp(db.class, pop(kPop).class) and $ strcmp(db.type , pop(kPop).type) , nbLoc ) endelse endif else begin if strcmp(pop(kPop).class,'*',1) then begin loc = where( (db.diam.val le diamCut(kDiam) and db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ; (db.dens.unc+db.dens.val le 8.0) and $ strcmp( db.type, pop(kPop).type), nbLoc ) endif else begin loc = where( (db.diam.val le diamCut(kDiam) and db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ; (db.dens.unc+db.dens.val le 8.0) and $ strcmp(db.class, pop(kPop).class) and $ strcmp(db.type , pop(kPop).type) , nbLoc ) endelse endelse ; print, kDens, kDiam, kPop, diamCut(kDiam-1),diamCut(kDiam), pop(kPop).type, pop(kPop).class, pop(kPop).taxo, densCut(kDens), nbLoc, $ ; format='(I2,1x,I2,1x,I2,3x,I3,1x,I3,3x,A-5,1x,A-3,1x,A-7,3x,F8.2,3x,I3)' ; stop ;--III.3.2-- Select All Taxonomic Classes ------------------------------------------- if strcmp(pop(kPop).taxo,'*',1) then begin sel=loc nbSel=nbLoc ;--III.3.3-- Select Specified Taxonomic Classes ------------------------------------- endif else begin ;--III.3.3/A-- Number of Taxonomic Classes Specified split = strtrim(strsplit(pop(kPop).taxo, ',', /extract, count=nbTaxo),2) sel = [0] nbSel= 0 for kTaxo=0, nbTaxo-1 do begin ;--III.3.3/B-- Input *is* a Class if strlen(split(kTaxo)) le 3 then begin sub = where( strcmp(db(loc).taxo,split(kTaxo),/fold), nbSub ) if sub(0) ne -1 then begin sel = [sel, loc(sub)] nbSel+= nbSub endif ;--III.3.3/C-- Input is a whole Complex/Population endif else begin ;--III.3.3/C.1-- List Classes within Complex/Population comp = where(strcmp(split(kTaxo),link.pop), nbComp) ;--III.3.3/C.2-- Loop over Complex/Population for kComp=0, nbComp-1 do begin sub = where( strcmp(db(loc).taxo,link(comp(kComp)).class,/fold), nbSub ) if sub(0) ne -1 then begin ; print, link(comp(kComp)).class, nbSub sel = [sel, loc(sub)] nbSel += nbSub endif endfor endelse endfor ;--III.3.3/D-- Adjust Selection Length if nbSel ne 0 then sel = sel(1:nbSel) endelse ;--III.3.3 -- Taxonomy ; print, kDens, kDiam, kPop, diamCut(kDiam-1),diamCut(kDiam), pop(kPop).type, pop(kPop).class, pop(kPop).taxo, densCut(kDens), nbSel, $ ; format='(I2,1x,I2,1x,I2,3x,I3,1x,I3,3x,A-5,1x,A-3,1x,A-7,3x,F8.2,3x,I3)' ; if keyword_set(verbose) then begin ; print, '[S-'+string(nbDiamCut-kDiam,format='(I1)')+'/'+string(nbDiamCut,format='(I1)')+': '+$ ; string(diamCut(kDiam-1),format='(I3)')+'-'+string(diamCut(kDiam),format='(I5)')+' km] '+$ ; '[P-'+string(kPop+1,format='(I1)')+'/'+string(nbPop,format='(I1)')+': '+$ ; strtrim(pop(kPop).name,2)+'] '+strtrim(string(nbSel,format='(I)'),2) ; endif ; if nbSel ge 1 then begin ; forprint, db.num, db.name, db.type, db.class, db.taxo, db.diam.val, $ ; format='(I6,1x,A-15,1x,A-6,1x,A-3,1x,A-3,3x,I4)', $ ; subset=sel, textout=2 ; ; endif ;--III.4-- Plot Current Selection ------------------------------------------------- for kSel=0, nbSel-1 do begin oplot, [db(sel(kSel)).dens.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [db(sel(kSel)).dens.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) endfor endfor ;--III.3-- Population endfor ;--III.2-- Diameter ;--III.6-- Plot Key Symbols ------------------------------------------------------- if ssoddConf.setup.db.key eq 1 then begin ;--III.6.1-- Symbol Style/Color and Population -------------------------------------- ;--III.6.1/A-- Placement xKey = 9.25 xShift = 0.5 yKey = 1e11 yShift = (0.85*yKey) * exp(findgen(nbPop+3)+1) - yKey ;--III.6.1/B-- Drawing kPlace=0 for kPop=0, nbPop-1 do begin popUse = where( strcmp(db.type, pop(kPop).type, /fold) ) if popUse(0) ne -1 then begin oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) xyouts, xKey+0.25, yKey+yShift(kPlace), pop(kPop).name, chars=0.5 kPlace++ endif endfor ;--III.6.1/C-- Legend xyouts, xKey+0.9, 0.5*yKey+yShift(kPlace), 'Taxonomy', align=0.5, chars=0.5 xyouts, xKey-xShift*(nbDens-1)/2., 0.5*yKey+yShift(kPlace+1), 'Relative precision (%)', align=0.5, chars=0.5 ;--III.6.1/D-- Density Precision if kDens ne nbDens-1 then begin xyouts, xKey-xShift*(nbDens-1-kDens), yKey+yShift(kPlace), '<'+string( 100*densCut(kDens), format='(I3)')+'%', chars=.5, align=.5 endif else begin xyouts, xKey-xShift*(nbDens-1-kDens)-.1, yKey+yShift(kPlace), '<', chars=.5, align=.5 xyouts, xKey-xShift*(nbDens-1-kDens)+.1, yKey+yShift(kPlace), '8', chars=.5, align=0, orient=90. endelse ;--III.6.2-- Symbol Size and Diameter ----------------------------------------------- ;--III.6.2/A-- Placement xKey=10 ex = string(yKey+yShift(kPlace), Format='(e8.0)') pt = StrPos(ex, '.') taxoExpo = StrMid(ex, pt+3) yKey=10^(float(taxoExpo)+1) yShift = yKey * exp(findgen(nbDiamCut+1)) ;--III.6.2/B-- Drawing ;--III.6.2/B.1-- First Range = Below Threshold xyouts, xKey+1.00, 0.5*yKey+yShift(1), align=0.5, chars=0.5, cgGreek('Phi') xyouts, xKey+1.20, 0.5*yKey+yShift(1), align=0.5, chars=0.5, '<' xyouts, xKey+1.30, 0.5*yKey+yShift(1), align=0.0, chars=0.5, strtrim(string(diamCut(1),format='(I)'),2) oplot, [xKey], [yKey]+yShift(1), symsize=diamRad(0), psym=cgSymCat('OpenCircle') ;--III.6.2/B.2-- N Ranges = Between Thresholds for kDiam=nbDiamCut-2, 2, -1 do begin oplot, [xKey], [yKey]+yShift(kDiam), symsize=diamRad(kDiam-1), psym=cgSymCat('OpenCircle') xyouts, /data, xKey+0.70, 0.5*yKey+yShift(kDiam), align=1.0, chars=0.5, strtrim(string(diamCut(kDiam-1),format='(I)'),2) xyouts, /data, xKey+0.80, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, /data, xKey+1.00, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, cgGreek('Phi') xyouts, /data, xKey+1.20, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, /data, xKey+1.30, 0.5*yKey+yShift(kDiam), align=0.0, chars=0.5, strtrim(string(diamCut(kDiam),format='(I)'),2) endfor ;--III.6.2/B.3-- Last Range = Above Thresholds xyouts, xKey+0.70, 0.5*yKey+yShift(nbDiamCut-1), align=1.0, chars=0.5, strtrim(string(diamCut(nbDiamCut-2),format='(I)'),2) xyouts, xKey+0.80, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, '<' xyouts, xKey+1.00, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, cgGreek('Phi') oplot, [xKey], [yKey]+yShift(nbDiamCut-1), symsize=diamRad(nbDiamCut-2), psym=cgSymCat('OpenCircle') xyouts, xKey+1.00, 0.5*yKey+yShift(nbDiamCut), 'Diameter (km)', align=0.5, chars=0.5 endif ;--III.7-- Overplot Ranges for Meteorites ----------------------------------------- if ssoddConf.setup.db.met eq 1 then begin endif device, /close set_plot, 'X' endfor ;--III.1-- Density ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- IV -- Figure 2 - Mass -vs- Porosity -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--IV.1-- Density Selection ------------------------------------------------------ if keyword_set(verbose) then print, ' SSODD -- Figure 2: Mass -vs- Porosity' for kDens=0, nbDens-1 do begin ;--IV.1.1-- FileName if kDens eq nbDens-1 then nameCut='All' $ else nameCut= string( 100*densCut(kDens), format='(I03)') ;--IV.1.2-- EPS Device Configuration set_plot, 'PS' device, xsize=18, ysize=12 device, /COLOR, bits_per_pixel=8 device, filename=cwd+'figures/SSODD-Mass-vs-Porosity'+nameCut+'.eps' device, encapsulated = 1 device, /TIMES, FONT_SIZE=14 !P.FONT = 0 neg = where( db.porosity.val le 0 ) db(neg).porosity.val = 0 ;--IV.1.3-- Plot Area Configuration plot, /YLOG, db.porosity.val, db.mass.val, /nodata, $ psym=3, xst=1, yst=1, $ ytickint=1, yminor=5, YR=[1e11, 1e23], $ ytickname=[' ', '10!U12',' ', '10!U14',' ', '10!U16',' ', '10!U18',' ', '10!U20',' ', '10!U22', ' '], $ xtickint=20, xminor=4, XR=[0,100], $ xtitle="Porosity (%)", $ ytitle="Mass (kg)", $ charsize=0.6, $ /DEVICE, position=[1100,800, 17700, 11800] ;--IV.2-- Diameter Selection ----------------------------------------------------- for kDiam=nbDiamCut-1, 1, -1 do begin ;--IV.3-- Population Selection --------------------------------------------------- for kPop=0, nbPop-1 do begin ;print, pop(kPop).id ;--IV.3.1-- Local Set of Type/Class and Size --------------------------------------- if strcmp(pop(kPop).class,'*',1) then begin loc = where( (db.diam.val le diamCut(kDiam) and $ db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ;db.dens.val-db.dens.unc le maxDens strcmp( db.type, pop(kPop).type), nbLoc ) endif else begin loc = where( (db.diam.val le diamCut(kDiam) and $ db.diam.val gt diamCut(kDiam-1) ) and $ strcmp(db.type , pop(kPop).type) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ;db.dens.val-db.dens.unc le maxDens strcmp(db.class, pop(kPop).class), nbLoc ) endelse ;--IV.3.2-- Select All Taxonomic Classes ------------------------------------------- if strcmp(pop(kPop).taxo,'*',1) then begin sel=loc nbSel=nbLoc ;--IV.3.3-- Select Specified Taxonomic Classes ------------------------------------- endif else begin ;--IV.3.3/A-- Number of Taxonomic Classes Specified split = strtrim(strsplit(pop(kPop).taxo, ',', /extract, count=nbTaxo),2) sel = [0] nbSel= 0 for kTaxo=0, nbTaxo-1 do begin ;--IV.3.3/B-- Input *is* a Class if strlen(split(kTaxo)) le 3 then begin sub = where( strcmp(db(loc).taxo,split(kTaxo),/fold), nbSub ) if sub(0) ne -1 then begin sel = [sel, loc(sub)] nbSel+= nbSub endif ;--IV.3.3/C-- Input is a whole Complexe/Population endif else begin ;--IV.3.3/C.1-- List Classes within Complexe/Population comp = where(strcmp(split(kTaxo),link.pop), nbComp) ;--IV.3.3/C.2-- Loop over Complexe/Population for kComp=0, nbComp-1 do begin sub = where( strcmp(db(loc).taxo,link(comp(kComp)).class,/fold), nbSub ) if sub(0) ne -1 then begin sel = [sel, loc(sub)] nbSel += nbSub endif endfor endelse endfor ;--IV.3.3/D-- Adjust Selection Length if nbSel ne 0 then sel = sel(1:nbSel) endelse ;--IV.3.3 -- Taxonomy ; if keyword_set(verbose) then begin ; print, '[S-'+string(nbDiamCut-kDiam,format='(I1)')+'/'+string(nbDiamCut,format='(I1)')+': '+$ ; string(diamCut(kDiam-1),format='(I3)')+'-'+string(diamCut(kDiam),format='(I5)')+' km] '+$ ; '[P-'+string(kPop+1,format='(I1)')+'/'+string(nbPop,format='(I1)')+': '+$ ; strtrim(pop(kPop).name,2)+'] '+strtrim(string(nbSel,format='(I)'),2) ; endif ; if nbSel ge 1 then begin ; forprint, db.num, db.name, db.type, db.class, db.taxo, db.diam.val, $ ; format='(I6,1x,A-15,1x,A-6,1x,A-3,1x,A-3,3x,I4)', $ ; subset=sel, textout=2 ; ; endif ;--IV.4-- Plot Current Selection ------------------------------------------------- for kSel=0, nbSel-1 do begin oplot, [db(sel(kSel)).porosity.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [db(sel(kSel)).porosity.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) endfor endfor ;--IV.3-- Population endfor ;--IV.2-- Diameter ;--IV.6-- Plot Key Symbols ------------------------------------------------------- if ssoddConf.setup.db.key eq 1 then begin ;--IV.6.1-- Symbol Style/Color and Population -------------------------------------- ;--IV.6.1/A-- Placement xKey = 75 xShift = 5 yKey = 1e11 yShift = (0.85*yKey) * exp(findgen(nbPop+3)+1) - yKey ;--IV.6.1/B-- Drawing kPlace=0 for kPop=0, nbPop-1 do begin popUse = where( strcmp(db.type, pop(kPop).type, /fold) ) if popUse(0) ne -1 then begin oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) xyouts, xKey+2, yKey+yShift(kPlace), pop(kPop).name, chars=0.5 kPlace++ endif endfor ;--IV.6.1/C-- Legend xyouts, xKey+10, 0.5*yKey+yShift(kPlace), 'Taxonomy', align=0.5, chars=0.5 xyouts, xKey-xShift*(nbDens-1)/2., 0.5*yKey+yShift(kPlace+1), 'Relative precision (%)', align=0.5, chars=0.5 ;--IV.6.1/D-- Density Precision if kDens ne nbDens-1 then begin xyouts, xKey-xShift*(nbDens-1-kDens), yKey+yShift(kPlace), '<'+string( 100*densCut(kDens), format='(I3)')+'%', chars=.5, align=.5 endif else begin xyouts, xKey-xShift*(nbDens-1-kDens)-1, yKey+yShift(kPlace), '<', chars=.5, align=.5 xyouts, xKey-xShift*(nbDens-1-kDens)+1, yKey+yShift(kPlace), '8', chars=.5, align=0, orient=90. endelse ;--IV.6.2-- Symbol Size and Diameter ----------------------------------------------- ;--IV.6.2/A-- Placement xKey=80 ex = string(yKey+yShift(kPlace), Format='(e8.0)') pt = StrPos(ex, '.') taxoExpo = StrMid(ex, pt+3) yKey=10^(float(taxoExpo)+1) yShift = yKey * exp(findgen(nbDiamCut+1)) ;--IV.6.2/B-- Drawing ;--IV.6.2/B.1-- First Range = Below Threshold xyouts, xKey+ 8, 0.5*yKey+yShift(1), align=0.5, chars=0.5, cgGreek('Phi') xyouts, xKey+10, 0.5*yKey+yShift(1), align=0.5, chars=0.5, '<' xyouts, xKey+11, 0.5*yKey+yShift(1), align=0.0, chars=0.5, strtrim(string(diamCut(1),format='(I)'),2) oplot, [xKey], [yKey]+yShift(1), symsize=diamRad(0), psym=cgSymCat('OpenCircle') ;--IV.6.2/B.2-- N Ranges = Between Thresholds for kDiam=nbDiamCut-2, 2, -1 do begin oplot, [xKey], [yKey]+yShift(kDiam), symsize=diamRad(kDiam-1), psym=cgSymCat('OpenCircle') xyouts, xKey+ 5, 0.5*yKey+yShift(kDiam), align=1.0, chars=0.5, strtrim(string(diamCut(kDiam-1),format='(I)'),2) xyouts, xKey+ 6, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, xKey+ 8, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, cgGreek('Phi') xyouts, xKey+10, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, xKey+11, 0.5*yKey+yShift(kDiam), align=0.0, chars=0.5, strtrim(string(diamCut(kDiam),format='(I)'),2) endfor ;--IV.6.2/B.3-- Last Range = Above Thresholds xyouts, xKey+ 5, 0.5*yKey+yShift(nbDiamCut-1), align=1.0, chars=0.5, strtrim(string(diamCut(nbDiamCut-2),format='(I)'),2) xyouts, xKey+ 6, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, '<' xyouts, xKey+ 8, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, cgGreek('Phi') oplot, [xKey], [yKey]+yShift(nbDiamCut-1), symsize=diamRad(nbDiamCut-2), psym=cgSymCat('OpenCircle') xyouts, xKey+8, 0.5*yKey+yShift(nbDiamCut), 'Diameter (km)', align=0.5, chars=0.5 endif ;--IV.7-- Overplot Ranges for Meteorites ----------------------------------------- if ssoddConf.setup.db.met eq 1 then begin endif device, /close set_plot, 'X' endfor ;--IV.1-- Density ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- V -- Figure 3 - Mass -vs- MacroPorosity -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--V.1-- Density Selection ------------------------------------------------------ if keyword_set(verbose) then print, ' SSODD -- Figure 3: Mass -vs- Macroporosity' for kDens=0, nbDens-1 do begin ;--V.1.1-- FileName if kDens eq nbDens-1 then nameCut='All' $ else nameCut= string( 100*densCut(kDens), format='(I03)') ;--V.1.2-- EPS Device Configuration set_plot, 'PS' device, xsize=18, ysize=12 device, /COLOR, bits_per_pixel=8 device, filename=cwd+'figures/SSODD-Mass-vs-Macroporosity'+nameCut+'.eps' device, encapsulated = 1 device, /TIMES, FONT_SIZE=14 !P.FONT = 0 neg = where( db.macroporosity.val le 0 ) db(neg).macroporosity.val = 0 ;--V.1.3-- Plot Area Configuration plot, /YLOG, db.macroporosity.val, db.mass.val, /nodata, $ psym=3, xst=1, yst=1, $ ytickint=1, yminor=5, YR=[1e11, 1e23], $ ytickname=[' ', '10!U12',' ', '10!U14',' ', '10!U16',' ', '10!U18',' ', '10!U20',' ', '10!U22', ' '], $ xtickint=20, xminor=4, XR=[0,100], $ xtitle="Macroporosity (%)", $ ytitle="Mass (kg)", $ charsize=0.6, $ /DEVICE, position=[1100,800, 17700, 11800] ;--V.2-- Diameter Selection ----------------------------------------------------- for kDiam=nbDiamCut-1, 1, -1 do begin ;--V.3-- Population Selection --------------------------------------------------- for kPop=0, nbPop-1 do begin ;print, pop(kPop).id ;--V.3.1-- Local Set of Type/Class and Size --------------------------------------- if strcmp(pop(kPop).class,'*',1) then begin loc = where( (db.diam.val le diamCut(kDiam) and $ db.diam.val gt diamCut(kDiam-1) ) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ;db.dens.val-db.dens.unc le maxDens strcmp( db.type, pop(kPop).type), nbLoc ) endif else begin loc = where( (db.diam.val le diamCut(kDiam) and $ db.diam.val gt diamCut(kDiam-1) ) and $ strcmp(db.type , pop(kPop).type) and $ (db.dens.unc/db.dens.val le densCut(kDens)) and $ ;db.dens.val-db.dens.unc le maxDens strcmp(db.class, pop(kPop).class), nbLoc ) endelse ;--V.3.2-- Select All Taxonomic Classes ------------------------------------------- if strcmp(pop(kPop).taxo,'*',1) then begin sel=loc nbSel=nbLoc ;--V.3.3-- Select Specified Taxonomic Classes ------------------------------------- endif else begin ;--V.3.3/A-- Number of Taxonomic Classes Specified split = strtrim(strsplit(pop(kPop).taxo, ',', /extract, count=nbTaxo),2) sel = [0] nbSel= 0 for kTaxo=0, nbTaxo-1 do begin ;--V.3.3/B-- Input *is* a Class if strlen(split(kTaxo)) le 3 then begin sub = where( strcmp(db(loc).taxo,split(kTaxo),/fold), nbSub ) if sub(0) ne -1 then begin sel = [sel, loc(sub)] nbSel+= nbSub endif ;--V.3.3/C-- Input is a whole Complexe/Population endif else begin ;--V.3.3/C.1-- List Classes within Complexe/Population comp = where(strcmp(split(kTaxo),link.pop), nbComp) ;--V.3.3/C.2-- Loop over Complexe/Population for kComp=0, nbComp-1 do begin sub = where( strcmp(db(loc).taxo,link(comp(kComp)).class,/fold), nbSub ) if sub(0) ne -1 then begin sel = [sel, loc(sub)] nbSel += nbSub endif endfor endelse endfor ;--V.3.3/D-- Adjust Selection Length if nbSel ne 0 then sel = sel(1:nbSel) endelse ;--V.3.3 -- Taxonomy ; if keyword_set(verbose) then begin ; print, '[S-'+string(nbDiamCut-kDiam,format='(I1)')+'/'+string(nbDiamCut,format='(I1)')+': '+$ ; string(diamCut(kDiam-1),format='(I3)')+'-'+string(diamCut(kDiam),format='(I5)')+' km] '+$ ; '[P-'+string(kPop+1,format='(I1)')+'/'+string(nbPop,format='(I1)')+': '+$ ; strtrim(pop(kPop).name,2)+'] '+strtrim(string(nbSel,format='(I)'),2) ; endif ; if nbSel ge 1 then begin ; forprint, db.num, db.name, db.type, db.class, db.taxo, db.diam.val, $ ; format='(I6,1x,A-15,1x,A-6,1x,A-3,1x,A-3,3x,I4)', $ ; subset=sel, textout=2 ; ; endif ;--V.4-- Plot Current Selection ------------------------------------------------- for kSel=0, nbSel-1 do begin oplot, [db(sel(kSel)).macroporosity.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [db(sel(kSel)).macroporosity.val], [db(sel(kSel)).mass.val], $ symsize=diamRad(kDiam-1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) endfor endfor ;--V.3-- Population endfor ;--V.2-- Diameter ;--V.6-- Plot Key Symbols ------------------------------------------------------- if ssoddConf.setup.db.key eq 1 then begin ;--V.6.1-- Symbol Style/Color and Population -------------------------------------- ;--V.6.1/A-- Placement xKey = 75 xShift = 5 yKey = 1e11 yShift = (0.85*yKey) * exp(findgen(nbPop+3)+1) - yKey ;--V.6.1/B-- Drawing kPlace=0 for kPop=0, nbPop-1 do begin popUse = where( strcmp(db.type, pop(kPop).type, /fold) ) if popUse(0) ne -1 then begin oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Open'+pop(kPop).symbol, $ color=cgColor('black'), $ thick=2) oplot, [xKey]-xShift*(nbDens-1-kDens), [yKey]+yShift(kPlace), $ symsize=diamRad(1), $ psym=cgSymCat('Filled'+pop(kPop).symbol, $ color=cgColor(pop(kPop).color)) xyouts, xKey+2, yKey+yShift(kPlace), pop(kPop).name, chars=0.5 kPlace++ endif endfor ;--V.6.1/C-- Legend xyouts, xKey+10, 0.5*yKey+yShift(kPlace), 'Taxonomy', align=0.5, chars=0.5 xyouts, xKey-xShift*(nbDens-1)/2., 0.5*yKey+yShift(kPlace+1), 'Relative precision (%)', align=0.5, chars=0.5 ;--V.6.1/D-- Density Precision if kDens ne nbDens-1 then begin xyouts, xKey-xShift*(nbDens-1-kDens), yKey+yShift(kPlace), '<'+string( 100*densCut(kDens), format='(I3)')+'%', chars=.5, align=.5 endif else begin xyouts, xKey-xShift*(nbDens-1-kDens)-1, yKey+yShift(kPlace), '<', chars=.5, align=.5 xyouts, xKey-xShift*(nbDens-1-kDens)+1, yKey+yShift(kPlace), '8', chars=.5, align=0, orient=90. endelse ;--V.6.2-- Symbol Size and Diameter ----------------------------------------------- ;--V.6.2/A-- Placement xKey=80 ex = string(yKey+yShift(kPlace), Format='(e8.0)') pt = StrPos(ex, '.') taxoExpo = StrMid(ex, pt+3) yKey=10^(float(taxoExpo)+1) yShift = yKey * exp(findgen(nbDiamCut+1)) ;--V.6.2/B-- Drawing ;--V.6.2/B.1-- First Range = Below Threshold xyouts, xKey+ 8, 0.5*yKey+yShift(1), align=0.5, chars=0.5, cgGreek('Phi') xyouts, xKey+10, 0.5*yKey+yShift(1), align=0.5, chars=0.5, '<' xyouts, xKey+11, 0.5*yKey+yShift(1), align=0.0, chars=0.5, strtrim(string(diamCut(1),format='(I)'),2) oplot, [xKey], [yKey]+yShift(1), symsize=diamRad(0), psym=cgSymCat('OpenCircle') ;--V.6.2/B.2-- N Ranges = Between Thresholds for kDiam=nbDiamCut-2, 2, -1 do begin oplot, [xKey], [yKey]+yShift(kDiam), symsize=diamRad(kDiam-1), psym=cgSymCat('OpenCircle') xyouts, xKey+ 5, 0.5*yKey+yShift(kDiam), align=1.0, chars=0.5, strtrim(string(diamCut(kDiam-1),format='(I)'),2) xyouts, xKey+ 6, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, xKey+ 8, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, cgGreek('Phi') xyouts, xKey+10, 0.5*yKey+yShift(kDiam), align=0.5, chars=0.5, '<' xyouts, xKey+11, 0.5*yKey+yShift(kDiam), align=0.0, chars=0.5, strtrim(string(diamCut(kDiam),format='(I)'),2) endfor ;--V.6.2/B.3-- Last Range = Above Thresholds xyouts, xKey+ 5, 0.5*yKey+yShift(nbDiamCut-1), align=1.0, chars=0.5, strtrim(string(diamCut(nbDiamCut-2),format='(I)'),2) xyouts, xKey+ 6, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, '<' xyouts, xKey+ 8, 0.5*yKey+yShift(nbDiamCut-1), align=0.5, chars=0.5, cgGreek('Phi') oplot, [xKey], [yKey]+yShift(nbDiamCut-1), symsize=diamRad(nbDiamCut-2), psym=cgSymCat('OpenCircle') xyouts, xKey+8, 0.5*yKey+yShift(nbDiamCut), 'Diameter (km)', align=0.5, chars=0.5 endif ;--V.7-- Overplot Ranges for Meteorites ----------------------------------------- if ssoddConf.setup.db.met eq 1 then begin endif device, /close set_plot, 'X' endfor ;--V.1-- Density end