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)]