"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n",
"/home/alf/gitwrk/pymoondb/moondb/__init__.py\n"
]
}
],
"source": [
"# First we import the moondb module\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
"\n",
"%aimport moondb\n",
"\n",
"print(moondb.__file__)"
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Apollo 11',\n",
" 'Apollo 12',\n",
" 'Apollo 14',\n",
" 'Apollo 15',\n",
" 'Apollo 16',\n",
" 'Apollo 17',\n",
" 'Luna 16',\n",
" 'Luna 20',\n",
" 'Luna 24']"
]
},
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Let's get a list of the missions in MoonDB\n",
"\n",
"mlist = moondb.get_missions()\n",
"\n",
"[m.name for m in mlist]"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MoonDB holds 2991 specimens from Apollo 17.\n"
]
}
],
"source": [
"# Now, we want to know how many specimens are available from the Apollo 17 missions\n",
"\n",
"f = moondb.SpecimenFilter()\n",
"mission = 'Apollo 17'\n",
"f.missionName = [ mission ]\n",
"results = f.get_results()\n",
"specimen_list = [r for r in results]\n",
"\n",
"print(\"MoonDB holds {} specimens from Apollo 17.\".format(len(specimen_list)))"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['COMPOSITE',\n",
" 'ROCK',\n",
" 'ROCK/Basalt/Ilmenite Basalt',\n",
" 'ROCK/Basalt/Unclassified Basalt',\n",
" 'ROCK/Breccia/Fragmental Breccia',\n",
" 'ROCK/Breccia/Impact Melt Breccia',\n",
" 'ROCK/Breccia/Regolith Breccia',\n",
" 'ROCK/Breccia/Unclassified Breccia',\n",
" 'ROCK/Crustal/Crustal:Cataclasite',\n",
" 'ROCK/Crustal/Crustal:Norite',\n",
" 'ROCK/Crustal/Crustal:Troctolite',\n",
" 'SOIL/Soil:1-2mm',\n",
" 'SOIL/Soil:2-4mm',\n",
" 'SOIL/Soil:4-10mm',\n",
" 'SOIL/Soil:<1mm',\n",
" 'SOIL/Soil:Unsieved',\n",
" 'Unknown']"
]
},
"execution_count": 79,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Get a list of type of specimen of Apollo 17 available in MoonDB\n",
"s_list = [s.specimenType for s in specimen_list]\n",
"list(sorted(set(s_list)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 108,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2991\n"
]
}
],
"source": [
"#\n",
"# Let's see the analyses done on the first specimen\n",
"#\n",
"\n",
"s_list = [s for s in specimen_list]\n",
"\n",
"print(len(s_list))\n",
"\n",
"s0 = s_list[0]\n",
"\n",
"an_list = [a for a in s0.get_analyses()]"
]
},
{
"cell_type": "code",
"execution_count": 109,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of CACULATED (code CALC)]\n"
]
}
],
"source": [
"# now we check the results of the first analysis\n",
"\n",
"#result_of\n",
"\n",
"print(an_list[0].dataResultsObj)"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Apollo 17 specimen: 76535,16\n",
"Result: Os 8.5 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Ir 55.0 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Ru 81.0 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Pt 54.0 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Pd 89.0 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Re 9.0 ppb (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Re187_Os188 5.1 Not Applicable (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: Os187_Os188 0.1511 Not Applicable (MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY)\n",
"Result: G_Os(T) -348.0 Not Applicable (CACULATED)\n"
The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
/home/alf/gitwrk/pymoondb/moondb/__init__.py
%% Cell type:code id: tags:
``` python
# Let's get a list of the missions in MoonDB
mlist=moondb.get_missions()
[m.nameforminmlist]
```
%% Output
['Apollo 11',
'Apollo 12',
'Apollo 14',
'Apollo 15',
'Apollo 16',
'Apollo 17',
'Luna 16',
'Luna 20',
'Luna 24']
%% Cell type:code id: tags:
``` python
# Now, we want to know how many specimens are available from the Apollo 17 missions
f=moondb.SpecimenFilter()
mission='Apollo 17'
f.missionName=[mission]
results=f.get_results()
specimen_list=[rforrinresults]
print("MoonDB holds {} specimens from Apollo 17.".format(len(specimen_list)))
```
%% Output
MoonDB holds 2991 specimens from Apollo 17.
%% Cell type:code id: tags:
``` python
# Get a list of type of specimen of Apollo 17 available in MoonDB
s_list=[s.specimenTypeforsinspecimen_list]
list(sorted(set(s_list)))
```
%% Output
['COMPOSITE',
'ROCK',
'ROCK/Basalt/Ilmenite Basalt',
'ROCK/Basalt/Unclassified Basalt',
'ROCK/Breccia/Fragmental Breccia',
'ROCK/Breccia/Impact Melt Breccia',
'ROCK/Breccia/Regolith Breccia',
'ROCK/Breccia/Unclassified Breccia',
'ROCK/Crustal/Crustal:Cataclasite',
'ROCK/Crustal/Crustal:Norite',
'ROCK/Crustal/Crustal:Troctolite',
'SOIL/Soil:1-2mm',
'SOIL/Soil:2-4mm',
'SOIL/Soil:4-10mm',
'SOIL/Soil:<1mm',
'SOIL/Soil:Unsieved',
'Unknown']
%% Cell type:code id: tags:
``` python
```
%%Celltype:codeid:tags:
``` python
```
%% Cell type:code id: tags:
``` python
#
# Let's see the analyses done on the first specimen
#
s_list = [s for s in specimen_list]
print(len(s_list))
s0 = s_list[0]
an_list = [a for a in s0.get_analyses()]
```
%% Output
2991
%% Cell type:code id: tags:
``` python
# now we check the results of the first analysis
#result_of
print(an_list[0].dataResultsObj)
```
%% Output
[result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of MULTICOLLECTOR INDUCTIVELY COUPLED PLASMA MASS SPECTROMETRY (code MC-ICP-MS), result of CACULATED (code CALC)]