STAK  l^"000DH`(p@W\""""""""̪3̪3 @"""""D"DĀ hC0&0 "U""U"U"UU"Uwwww݀UUUUH0 D9D"AA"A>"t"%2d$LA*@ @ "t"G"q]APP*,@ 1-- General HouseCleaning Routines -- on openStack AddColor install global gTheStudentName,gThePERM,gTheExercise,gHasCQD, gOKToColorize,gWorkPath,gOkToLeave,gMailPath,gAutoMountStoreVol hide menubar hide msg -- pass openStack end openStack function getHomePathName put word 2 of the long name of this stack into LONG_NAME put the short name of this stack into SHORT_NAME delete char 1 of LONG_NAME delete last char of LONG_NAME put offset(SHORT_NAME,LONG_NAME) into BREAK_LOC put char 1 to BREAK_LOC-1 of LONG_NAME into storePath repeat while storePath contains ":" if there is a stack storePath&"Arch Home" then return storePath else delete last char of storePath repeat until last char of storePath is ":" delete last char of storePath end repeat end if end repeat end getHomePathName on mouseEnter showHelp end mouseEnter on exitCard DIR global gTheEffect if DIR="F" then put fromRight into gTheEffect go to next card else put fromLeft into gTheEffect go to prev card end if end exitCard on doMenu menuItem if menuItem is "Last" then go to card "End" else pass doMenu end doMenu on showCardHelp answer "There is No Additional Help for This Card." end showCardHelp on openCard put the number of this cd&&"of"&&the number of cards into bg fld "Card No" put the short name of this card into theCard if there is a bg btn "Jump" then repeat with cnt = 1 to the number of lines of bg btn "Jump" if line cnt of bg btn "Jump" is theCard then exit repeat end repeat select line cnt of bg btn "Jump" else if there is a cd btn "Jump" then repeat with cnt = 1 to the number of lines of cd btn "Jump" if line cnt of cd btn "Jump" is theCard then exit repeat end repeat select line cnt of cd btn "Jump" end if end if Send colorMe to this card -- pass openCard end openCard on closeCard set cursor to watch lock screen -- pass closeCard end closeCard on centerHoriz theObject put the width of the card window div 2 into theCenter put the loc of theObject into theLoc put theCenter into item 1 of theLoc set the loc of theObject to theLoc end centerHoriz on colorMe global gTheEffect if gTheEffect is empty then put "stamp" into gTheEffect AddColor colorCard,gTheEffect,30 if there is a cd btn "Cover" then hide cd btn "Cover" end colorMe on closeStack AddColor remove show cd btn "Cover" of cd 1 --pass closeStack end closeStack on suspendStack end suspendStack on resumeStack end resumeStack on showHelp put line 1 of the script of the target into theHelp delete char 1 to 2 of theHelp delete char (offset("--",theHelp)) to length(theHelp) of theHelp put theHelp into bg fld "Help" balloon theHelp end showHelp function getPath put word 2 of the long name of this stack into LONG_NAME delete char 1 of LONG_NAME delete last char of LONG_NAME repeat until last char of LONG_NAME is ":" delete last char of LONG_NAME end repeat return LONG_NAME end getPath function getVol thePath put offset(":",thePath) into COL_LOC put char 1 to COL_LOC-1 of thePath into volName return volName end getVol function getLastPathItem PATH put empty into FILE_NAME repeat with CNT=the number of chars of PATH down to 1 if char CNT of PATH is not ":" then put char CNT of PATH before FILE_NAME else exit repeat end if end repeat return FILE_NAME end getLastPathItem function getFilePath thePath repeat with CNT=the length of thePath down to 1 if char CNT of thePath is ":" then return thePath else delete char CNT of thePath end if end repeat end getFilePath MASTlSX WLIST lp@} PAGE l-TIĊ|HD@r^A*0`*D$%#"HX( 7 I%*1&$@E8,11 BKGDX *l  !Big Text,&  !Small Text*&; Complete 9  Go Home--This button lets you Quit.--help TIME_LAPSE PCT DECAYED MIN_TIME -- end globalsToDump on mouseUp cleanUp if there is a cd btn "Cover" of cd 1 then show cd btn "Cover" of cd 1 send closeCard to this cd doMenu "Quit HyperCard" end mouseUp on cleanUp set cursor to watch put empty into bkgnd field "Complete" of card "K-Ar Process" dumpGlobals end cleanUp on dumpGlobals put the script of me into theScript put empty into globalsToDump repeat with lineNum=4 to the number of lines of theScript if line lineNum of theScript contains "end globalsToDump" then exit repeat else put (line lineNum of theScript)&return after globalsToDump end if end repeat delete last char of globalsToDump repeat with lineNum=1 to the number of lines of globalsToDump put "global"&&line lineNum of globalsToDump into setTheGlobal do setTheGlobal put "put empty into"&&line lineNum of globalsToDump into dumpTheGlobal do dumpTheGlobal end repeat end dumpGlobals~ <o RD Help--This button calls up a screen of more help.--help on mouseUp showCardHelp end mouseUp  p Previous Card--This button lets you go to the previous card.--help --None--PICTRes on mouseUp exitCard "B" end mouseUp Fy p Next Card--This button lets you go to the next card.--help --None--PICTRes on mouseUp exitCard "F" end mouseUp E  Jump--This pull down menu lets you jump to a specific card.--help on mouseUp global gTheEffect put "rectOpen" into gTheEffect go to card (the selectedText of me) end mouseUpbE Card No--This field shows you where you are in the stack.--help F  Help--This is the help field.--help .;g Picture Frame Beginning Contents Relative Techniques Superposition Stratigraphy End Deposit Cross-Dating Absolute Start Artifacts of Known Age Dendrochronology Log Section Dendro 3 Master Dendrogram Dendro Simulation Dendro Limits Radiocarbon Dating C14 Movie 1 C14 Movie 2 C14 Decay Text C14 Decay C14 Process C14 Limits 1 C14 Limits 2 C14 Limits 3 C14 Limits 4 C14 Limits 5 Potassium-Argon Dating K Bombardment Rock Melting K-Ar Decay K-Ar Process K-Ar Limits 1 K-Ar Limits 2 K-Ar Limits 3 EndBase@BMAPX,@FREEFree Object &$*0A K-40 ppm*CT AR-40 ppm0. Reading Number& sG  Avg K6 WnK  Potassium-Argon Years(E  Avg Ar*H  Est K-40,/0  Est Percent|.R  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUp|cqqV  --Click here to get information on this step.--help on mouseUp updateFields 2 end mouseUp |lW  --Click here to get information on this step.--help on mouseUp updateFields 2 end mouseUp|pU  --Click here to get information on this step.--help on mouseUp updateFields 3 end mouseUp |tY  --Click here to get information on this step.--help on mouseUp updateFields 4 end mouseUp|JuXZ  --Click here to get information on this step.--help on mouseUp updateFields 5 end mouseUp,!E  Info PromptnSvH  !Information on mouseUp lock screen hide me colorMe processSample end mouseUp(YAo Sample.Ca Purification.9W Distillation* MonitoredJl  ! More Info--Click here to hide me. on mouseUp hide me Addcolor "colorRect","cd",the rect of cd fld "More Info","52428,39321,26214" end mouseUp >f  Show Me Again--This button lets you run the simulation over.--help on mouseUp lock screen hide card field "More Info" clearIt unlock screen show msg at 81,399 type "I am Processing a Different Sample - the Dates will NOT Agree." processSample put empty into msg hide msg end mouseUp |#0AR  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUp|$CTR  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUpD&@ Coveron mouseUp hide me end mouseUpȀ  Comparing the ratio of K-40 to Ar-40 in a geological sample of lava lets us estimate the amount of K-40 that has decayed. Since we know the decay rate and half-life of K-40, we can approximately determine the length of time that has passed since the rock that the sample was a part of was last melted. This process is demonstrated here. Click Here to See SimulationSample Number&Average K-40 and Standard Deviation: 'Average Ar-40 and Standard Deviation:  %Estimate of Original Amount of K-40:Percentage of K-40 Remaining:&Age Estimate in Years Before Present:QEstimate the Time using the Percentage of K-40 and the known Decay Rate of K-40.4Click on the Label of Any Step for More Information1 of 1 K-40 Count Ar-40 Count 2017052 ppm30 9493 ppm2016549.500 ppm 973.7109500.733 ppm 5.6992102919.80 ppm 1480.6595.89 % 0.05 %78,656,509 Years B.P.YesK-Ar Processon openCard if bkgnd field "Complete"<>"Yes" then show bkgnd button "Next Card" show card field "Information" else show card button "Show Me Again" show bkgnd button "Next Card" end if hide bg fld "Small Text" hide bg btn "Picture Frame" pass openCard end openCard on closeCard clearIt hide card button "Show Me Again" hide card field "Info Prompt" hide cd fld "More Info" pass closeCard end closeCard -- Simulation Code Follows -- on processSample --Clean up First-- clearIt --FLASH BUTTONS IN SEQUENCE-- flashButtons -- Get Random Quantity Seeds -- put getRandomSeed() into SEEDS put item 1 of SEEDS into KSEED put item 2 of SEEDS into ARSEED upDateFields 1 -- Get Range of Values -- put getRange(KSEED,.0005) into KRANG put getRange(ARSEED,.0005) into ARRANG -- Generate Lists of Random Numbers within Range -- put generateRandomList(KSEED,KRANG,30,K) into KLIST put generateRandomList(ARSEED,ARRANG,30,AR) into ARLIST --CALCULATE AVERAGE READING AND STANDARD DEVIATION-- upDateFields 2 put stats(KLIST) into KSTATS put stats(ARLIST) into ARSTATS set the numberFormat to 0.00 put roundIt(item 1 of KSTATS,2) into AVG_K put roundIt(item 2 of KSTATS,2) into STD_K put roundIt(item 1 of ARSTATS,2) into AVG_AR put roundIt(item 2 of ARSTATS,2) into STD_AR set the numberFormat to 0.000 put AVG_K&&"ppm"&&""&&STD_K into card field "Avg K" put AVG_AR&&"ppm"&&""&&STD_AR into card field "Avg AR" --ESTIMATE THE ORIGINAL QUANTITY OF K-40-- upDateFields 3 put estimateOriginal(AVG_AR,STD_AR,AVG_K,STD_K) into EST set the numberFormat to 0.000 put roundIt(item 1 of EST,2) into AVG_EST put roundIt(item 2 of EST,2) into STD_EST put AVG_EST&&"ppm"&&""&&STD_EST into card field "Est K-40" --CALCULATE THE PERCENTAGE OF K-40 LEFT-- upDateFields 4 set the numberFormat to 0.00000000 put AVG_K/AVG_EST into REMAINING put STD_K/AVG_EST into STD_REM set the numberFormat to 0.00 put roundIt(REMAINING*100,2)&&"%"&&""&&roundIt(STD_REM*100,2)&&"%" into card field "Est Percent" --USE THE PERCENTAGE ESTIMATE TO FIND ESTIMATE OF YEARS-- upDateFields 5 set the numberFormat to 0.00000000000000000000000 put -0.00000000000000001689624 into DECAY_CONSTANT put 31556736 into SEC_PER_YR put ((ln(REMAINING)/DECAY_CONSTANT)/SEC_PER_YR) into YEARS_BP put offset(".",YEARS_BP) into DEC_LOC put char 1 to DEC_LOC-1 of YEARS_BP into YEARS_BP put round((ln(1-STD_REM)/DECAY_CONSTANT)/SEC_PER_YR) into STD_BP set the numberFormat to 0 put formatLong(YEARS_BP)&&"Years B.P."into card field "Potassium-Argon Years" --Clean up When You're Finished-- lock screen hide card field "More Info" enable bkgnd button "Next Card" show card field "Info Prompt" show card button "Show Me Again" AddColor "colorRect","cd",the rect of cd btn "Show Me Again","52428,52428,52428","2" put "Yes" into bkgnd field "Complete" colorMe end processSample on flashButtons put 1 into CRD_CNT repeat while CRD_CNT<=4 set cursor to busy put 0 into SEC put the seconds into START_SEC repeat while SEC<2 set cursor to busy set the hilite of card button CRD_CNT to true put the seconds-START_SEC into SEC set the hilite of card button CRD_CNT to false wait 5 ticks end repeat put CRD_CNT+1 into CRD_CNT end repeat end flashButtons function getRandomSeed put 0 into KSEED put 0 into ARSEED put random(100000)+1000 into KSEED put random(100) into ARSEED put KSEED*100 into KSEED put ARSEED*100 into ARSEED return KSEED&","&ARSEED end getRandomSeed function getRange SEED,INCREMENT put round(SEED+(SEED*INCREMENT)) into MAX put round(SEED-(SEED*INCREMENT))into MIN put MAX-MIN into RANGE return RANGE end getRange function generateRandomList SEED,RANGE,N,ATOM repeat with CNT=1 to N put random(RANGE) into ADD_IT if ADD_IT/2=trunc(ADD_IT/2) then put SEED+ADD_IT into PPM else put SEED-ADD_IT into PPM end if set the numberFormat to 0 if ATOM is "K" then put PPM&&"ppm" into card field "K-40 ppm" else put PPM&&"ppm" into card field "AR-40 ppm" end if put CNT into card field "Reading Number" set the numberFormat to 0.00000 put PPM&return after LIST end repeat return LIST end generateRandomList function estimateOriginal AVG_AR,STD_AR,AVG_K,STD_K set the numberFormat to 0.00000000 put AVG_AR+STD_AR into HIGH_AR put AVG_AR-STD_AR into LOW_AR put HIGH_AR*9.09090909 into HIGH_EST put LOW_AR*9.09090909 into LOW_EST put (HIGH_EST+LOW_EST)/2 into AVG_EST put HIGH_EST+LOW_EST into SUM_EST put sqr(HIGH_EST)+sqr(LOW_EST) into SQSUM_EST put (SQSUM_EST-(sqr(SUM_EST)/2))/(2-1) into VAR_EST put sqrt(VAR_EST) into STD_EST put AVG_EST+STD_EST into HIGH_EST put AVG_EST-STD_EST into LOW_EST put AVG_K+STD_K into HIGH_K put AVG_K-STD_K into LOW_K put HIGH_K+HIGH_EST into HIGH_EST put LOW_K+LOW_EST into LOW_EST put (HIGH_EST+LOW_EST)/2 into AVG_EST put HIGH_EST+LOW_EST into SUM_EST put sqr(HIGH_EST)+sqr(LOW_EST) into SQSUM_EST put (SQSUM_EST-(sqr(SUM_EST)/2))/(2-1) into VAR_EST put sqrt(VAR_EST) into STD_EST return AVG_EST&","&STD_EST end estimateOriginal on upDateFields NUM hide card field "More Info" Addcolor "colorRect","cd",the rect of cd fld "More Info","52428,39321,26214" if NUM = 1 then put "Monitor counts the number of K-40 and AR-40 parts per million." into card field "More Info" show card field "More Info" at 260,60 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" else if NUM = 2 then put "Calculate the Average and Standard Deviation for each gas " into card field "More Info" put "in ppm. This tells you how much of each element you have." after card field "More Info" show card field "More Info" at 260,130 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 3 then put "Estimate the Original Quantity of K-40 by Multiplying " into card field "More Info" put "the amount of AR-40 by the ratio of K-40 to AR-40." after card field "More Info" show card field "More Info" at 260,240 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 4 then put "Estimate the Percentage of K-40 left in the Sample." into card field "More Info" show card field "More Info" at 260,300 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 5 then put "Estimate the Time using the Percentage of K-40 " into card field "More Info" put "and the known Decay Rate of K-40." after card field "More Info" show card field "More Info" at 260,361 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 second end if end if end if end if end if end upDateFields function stats theList put 0 into theSum put 0 into theSquaredSum repeat with lineCount=1 to the number of lines of theList set cursor to busy add line lineCount of theList to theSum add (line lineCount of theList)^2 to theSquaredSum end repeat put the number of lines of theList into N put theSum/N into theAverage put sqrt((theSquaredSum-((theSum^2)/N))/(N-1)) into theSTD return (theAverage&","&theSTD) end stats function roundIt theNumber,thePlaces put "0." into theDecimals repeat with cnt=1 to thePlaces put "0" after theDecimals end repeat set the numberFormat to theDecimals add 0 to theNumber return theNumber end roundIt function sqr theNumber return (theNumber^2) end sqr function formatLong YEARS repeat forever put the length of YEARS into CHAR_CNT if CHAR_CNT>3 then put ","&char CHAR_CNT-2 to CHAR_CNT of YEARS before NEW_YEAR delete char CHAR_CNT-2 to CHAR_CNT of YEARS put the length of YEARS into CHAR_CNT else put YEARS before NEW_YEAR exit repeat end if end repeat return NEW_YEAR end formatLong on clearIt put empty into card field "K-40 ppm" put empty into card field "AR-40 ppm" put empty into card field "Reading Number" put empty into card field "Avg K" put empty into card field "Potassium-Argon Years" put empty into card field "Avg AR" put empty into card field "Est K-40" put empty into card field "Est Percent" end clearIt BMAPS@b   !? !l 1 @""> P P  pwHR ] 0:x{ w*^lmD "'(D 0@P` P戏hP* PU5W P \)@ "3p`@B"B6Àg"B@Fs`  8  20% @6l0IVqUPB5MJ8C`CA FCE @QP`*`  ! 18 1 @3`? \ bU 7Hl 3`n6cm  15030a@ 013(B*QPP@0 @UU\ @ @UU\ u``1h5G!i㙜5Mkm65+"@z"UV%T@` 5U@z I"@ @UU\ %c 1(eI{Os e@maN6` a r "prh1*,*"(!   8 %S `%4 Fgy`'>qF殺QQ*f,`# V h8U:P8 s8 Vax00 F%¤` y K?Iπ 0n Y t %c(i3 B(렴U( * 8* 8 8) K8p 8' 8 80 :888 y@@8$ $8@ ,Y `Gf"4V 2@@&32  2``S @ @@"aj@"y@"Mj":8"H *2Ā*2@k  H%p H8 H H H H ""-D@B.4J(*` @05@0P0Bʪ@-P(,!tP=1q%5PQ:3 4PBpjC8`>UP TԪ0 @U/"8uUUP@ p݀CYB/:`UP3a0:F`2"6UUP?`DDDDDD2"6UUP?@D@16UUP 0@D@ ~d{n&UUP xL}`U HL7h6UUPB 0Y0d@D@ C7@DDDDDDUUPp>lp`T6UUP$`DDDDDD?p6UUP(2`" RFUUL'` `DDDDDD<xF?&UUpmB2g׵wr}- UW$ 2 <  0 p4 p p p p p p  s2",¥ STBL\ S@FTBLWNew YorkGeneva,Chicago,`CARD &*0A K-40 ppm*CT AR-40 ppm0. Reading Number& sG  Avg K6 WnK  Potassium-Argon Years(E  Avg Ar*H  Est K-40,/0  Est Percent|.R  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUp|cqqV  --Click here to get information on this step.--help on mouseUp updateFields 2 end mouseUp |lW  --Click here to get information on this step.--help on mouseUp updateFields 2 end mouseUp|pU  --Click here to get information on this step.--help on mouseUp updateFields 3 end mouseUp |tY  --Click here to get information on this step.--help on mouseUp updateFields 4 end mouseUp|JuXZ  --Click here to get information on this step.--help on mouseUp updateFields 5 end mouseUp,!E  Info PromptnSvH  !Information on mouseUp lock screen hide me colorMe processSample end mouseUp(YAo Sample.Ca Purification.9W Distillation* MonitoredJl  ! More Info--Click here to hide me. on mouseUp hide me Addcolor "colorRect","cd",the rect of cd fld "More Info","52428,39321,26214" end mouseUp >f  Show Me Again--This button lets you run the simulation over.--help on mouseUp lock screen hide card field "More Info" clearIt unlock screen show msg at 81,399 type "I am Processing a Different Sample - the Dates will NOT Agree." processSample put empty into msg hide msg end mouseUp |#0AR  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUp|$CTR  --Click here to get information on this step.--help on mouseUp updateFields 1 end mouseUpD&@ Coveron mouseUp hide me end mouseUpȀ  Comparing the ratio of K-40 to Ar-40 in a geological sample of lava lets us estimate the amount of K-40 that has decayed. Since we know the decay rate and half-life of K-40, we can approximately determine the length of time that has passed since the rock that the sample was a part of was last melted. This process is demonstrated here. Click Here to See SimulationSample Number&Average K-40 and Standard Deviation: 'Average Ar-40 and Standard Deviation:  %Estimate of Original Amount of K-40:Percentage of K-40 Remaining:&Age Estimate in Years Before Present:QEstimate the Time using the Percentage of K-40 and the known Decay Rate of K-40.4Click on the Label of Any Step for More Information1 of 1 K-40 Count Ar-40 CountThis button lets you Quit.K-Ar Processon openCard if bkgnd field "Complete"<>"Yes" then show bkgnd button "Next Card" show card field "Information" else show card button "Show Me Again" show bkgnd button "Next Card" end if hide bg fld "Small Text" hide bg btn "Picture Frame" pass openCard end openCard on closeCard clearIt hide card button "Show Me Again" hide card field "Info Prompt" hide cd fld "More Info" pass closeCard end closeCard -- Simulation Code Follows -- on processSample --Clean up First-- clearIt --FLASH BUTTONS IN SEQUENCE-- flashButtons -- Get Random Quantity Seeds -- put getRandomSeed() into SEEDS put item 1 of SEEDS into KSEED put item 2 of SEEDS into ARSEED upDateFields 1 -- Get Range of Values -- put getRange(KSEED,.0005) into KRANG put getRange(ARSEED,.0005) into ARRANG -- Generate Lists of Random Numbers within Range -- put generateRandomList(KSEED,KRANG,30,K) into KLIST put generateRandomList(ARSEED,ARRANG,30,AR) into ARLIST --CALCULATE AVERAGE READING AND STANDARD DEVIATION-- upDateFields 2 put stats(KLIST) into KSTATS put stats(ARLIST) into ARSTATS set the numberFormat to 0.00 put roundIt(item 1 of KSTATS,2) into AVG_K put roundIt(item 2 of KSTATS,2) into STD_K put roundIt(item 1 of ARSTATS,2) into AVG_AR put roundIt(item 2 of ARSTATS,2) into STD_AR set the numberFormat to 0.000 put AVG_K&&"ppm"&&""&&STD_K into card field "Avg K" put AVG_AR&&"ppm"&&""&&STD_AR into card field "Avg AR" --ESTIMATE THE ORIGINAL QUANTITY OF K-40-- upDateFields 3 put estimateOriginal(AVG_AR,STD_AR,AVG_K,STD_K) into EST set the numberFormat to 0.000 put roundIt(item 1 of EST,2) into AVG_EST put roundIt(item 2 of EST,2) into STD_EST put AVG_EST&&"ppm"&&""&&STD_EST into card field "Est K-40" --CALCULATE THE PERCENTAGE OF K-40 LEFT-- upDateFields 4 set the numberFormat to 0.00000000 put AVG_K/AVG_EST into REMAINING put STD_K/AVG_EST into STD_REM set the numberFormat to 0.00 put roundIt(REMAINING*100,2)&&"%"&&""&&roundIt(STD_REM*100,2)&&"%" into card field "Est Percent" --USE THE PERCENTAGE ESTIMATE TO FIND ESTIMATE OF YEARS-- upDateFields 5 set the numberFormat to 0.00000000000000000000000 put -0.00000000000000001689624 into DECAY_CONSTANT put 31556736 into SEC_PER_YR put ((ln(REMAINING)/DECAY_CONSTANT)/SEC_PER_YR) into YEARS_BP put offset(".",YEARS_BP) into DEC_LOC put char 1 to DEC_LOC-1 of YEARS_BP into YEARS_BP put round((ln(1-STD_REM)/DECAY_CONSTANT)/SEC_PER_YR) into STD_BP set the numberFormat to 0 put formatLong(YEARS_BP)&&"Years B.P."into card field "Potassium-Argon Years" --Clean up When You're Finished-- lock screen hide card field "More Info" enable bkgnd button "Next Card" show card field "Info Prompt" show card button "Show Me Again" AddColor "colorRect","cd",the rect of cd btn "Show Me Again","52428,52428,52428","2" put "Yes" into bkgnd field "Complete" colorMe end processSample on flashButtons put 1 into CRD_CNT repeat while CRD_CNT<=4 set cursor to busy put 0 into SEC put the seconds into START_SEC repeat while SEC<2 set cursor to busy set the hilite of card button CRD_CNT to true put the seconds-START_SEC into SEC set the hilite of card button CRD_CNT to false wait 5 ticks end repeat put CRD_CNT+1 into CRD_CNT end repeat end flashButtons function getRandomSeed put 0 into KSEED put 0 into ARSEED put random(100000)+1000 into KSEED put random(100) into ARSEED put KSEED*100 into KSEED put ARSEED*100 into ARSEED return KSEED&","&ARSEED end getRandomSeed function getRange SEED,INCREMENT put round(SEED+(SEED*INCREMENT)) into MAX put round(SEED-(SEED*INCREMENT))into MIN put MAX-MIN into RANGE return RANGE end getRange function generateRandomList SEED,RANGE,N,ATOM repeat with CNT=1 to N put random(RANGE) into ADD_IT if ADD_IT/2=trunc(ADD_IT/2) then put SEED+ADD_IT into PPM else put SEED-ADD_IT into PPM end if set the numberFormat to 0 if ATOM is "K" then put PPM&&"ppm" into card field "K-40 ppm" else put PPM&&"ppm" into card field "AR-40 ppm" end if put CNT into card field "Reading Number" set the numberFormat to 0.00000 put PPM&return after LIST end repeat return LIST end generateRandomList function estimateOriginal AVG_AR,STD_AR,AVG_K,STD_K set the numberFormat to 0.00000000 put AVG_AR+STD_AR into HIGH_AR put AVG_AR-STD_AR into LOW_AR put HIGH_AR*9.09090909 into HIGH_EST put LOW_AR*9.09090909 into LOW_EST put (HIGH_EST+LOW_EST)/2 into AVG_EST put HIGH_EST+LOW_EST into SUM_EST put sqr(HIGH_EST)+sqr(LOW_EST) into SQSUM_EST put (SQSUM_EST-(sqr(SUM_EST)/2))/(2-1) into VAR_EST put sqrt(VAR_EST) into STD_EST put AVG_EST+STD_EST into HIGH_EST put AVG_EST-STD_EST into LOW_EST put AVG_K+STD_K into HIGH_K put AVG_K-STD_K into LOW_K put HIGH_K+HIGH_EST into HIGH_EST put LOW_K+LOW_EST into LOW_EST put (HIGH_EST+LOW_EST)/2 into AVG_EST put HIGH_EST+LOW_EST into SUM_EST put sqr(HIGH_EST)+sqr(LOW_EST) into SQSUM_EST put (SQSUM_EST-(sqr(SUM_EST)/2))/(2-1) into VAR_EST put sqrt(VAR_EST) into STD_EST return AVG_EST&","&STD_EST end estimateOriginal on upDateFields NUM hide card field "More Info" Addcolor "colorRect","cd",the rect of cd fld "More Info","52428,39321,26214" if NUM = 1 then put "Monitor counts the number of K-40 and AR-40 parts per million." into card field "More Info" show card field "More Info" at 260,60 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" else if NUM = 2 then put "Calculate the Average and Standard Deviation for each gas " into card field "More Info" put "in ppm. This tells you how much of each element you have." after card field "More Info" show card field "More Info" at 260,130 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 3 then put "Estimate the Original Quantity of K-40 by Multiplying " into card field "More Info" put "the amount of AR-40 by the ratio of K-40 to AR-40." after card field "More Info" show card field "More Info" at 260,240 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 4 then put "Estimate the Percentage of K-40 left in the Sample." into card field "More Info" show card field "More Info" at 260,300 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 seconds else if NUM = 5 then put "Estimate the Time using the Percentage of K-40 " into card field "More Info" put "and the known Decay Rate of K-40." after card field "More Info" show card field "More Info" at 260,361 Addcolor "colorRect","cd",the rect of cd fld "More Info","65535,65535,52428" wait 4 second end if end if end if end if end if end upDateFields function stats theList put 0 into theSum put 0 into theSquaredSum repeat with lineCount=1 to the number of lines of theList set cursor to busy add line lineCount of theList to theSum add (line lineCount of theList)^2 to theSquaredSum end repeat put the number of lines of theList into N put theSum/N into theAverage put sqrt((theSquaredSum-((theSum^2)/N))/(N-1)) into theSTD return (theAverage&","&theSTD) end stats function roundIt theNumber,thePlaces put "0." into theDecimals repeat with cnt=1 to thePlaces put "0" after theDecimals end repeat set the numberFormat to theDecimals add 0 to theNumber return theNumber end roundIt function sqr theNumber return (theNumber^2) end sqr function formatLong YEARS repeat forever put the length of YEARS into CHAR_CNT if CHAR_CNT>3 then put ","&char CHAR_CNT-2 to CHAR_CNT of YEARS before NEW_YEAR delete char CHAR_CNT-2 to CHAR_CNT of YEARS put the length of YEARS into CHAR_CNT else put YEARS before NEW_YEAR exit repeat end if end repeat return NEW_YEAR end formatLong on clearIt put empty into card field "K-40 ppm" put empty into card field "AR-40 ppm" put empty into card field "Reading Number" put empty into card field "Avg K" put empty into card field "Potassium-Argon Years" put empty into card field "Avg AR" put empty into card field "Est K-40" put empty into card field "Est Percent" end clearIt 1FREEFree Object ){ CCCCCCCCCCCMCCCCCCCCCCCCCCCMCCCCCCCCCCCCCCCM{CCCCCCCCCCCMCCCCCCCCCNCCCCCCCCCCCC{NCCCCCCCCCN{CCCCC CCCCCC {CCCCC{ E{CCCC"CѦ *VCCC CCCCCC CCCCC H{CCCCC$CC ,ˠCCCꬦPQVꬬV{R+{+ YF^^^^^^^^F߭^^^^^^E˧߭ECCCCCCDCCCCC{DCCCCDCCCCCCDCCCCCCC{CCCC{C{CCCCCCCCCCCV1CCCC{0CCCCC/ˠ{{{{CCCCCCC{/+Ѭꬬ+CCCCCCCCCCCCCCCCCC/+VV+VCCCCCCCCCCCCCCCC. +CCCCCCV {CCCCCCCCCCCCCCCCCѦ.CCCCC CCCCCCCCCCCCCCCCC.CCCC CCCCCCCCCCCCCC{.CCCCCC {CCCCCCCCCCCCCCCCC-CCCCCC{ CCCCCCCCCCCCCCCCCCCCCC-CCCC CCCCCCCCCCC-{CCCC {CCCCCCCCCCCCCCCCC-CCCCCC CCCCCCCCCCCCCCC-CCCC CCCCCCCCC-VCCCCC CCCCCCCCC-CCCCCCCCCCC CCCCCCCCCCCC-CCCCCCCCCCCCCCC{ {CCCCCCCCC-CCCCC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