<jupyter_start><jupyter_text>Science Case 6a:  summary of all data|Here are some statistics on your data<jupyter_code>import pandas as pd
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.width', None)
pd.set_option('display.max_colwidth',25)

from astroquery.admit import ADMIT<jupyter_output><empty_output><jupyter_text>For now a private database, just for MAPS<jupyter_code>a = ADMIT()
a.check()<jupyter_output>Found  /home/teuben/ALMA/study7/query/admit.db
Checking db.... 0
71 71 71
Database version: 27-feb-2022. core.py version: 26-feb-2022
header    : 1 entries
alma      : 124 entries
win       : 123 entries
lines     : 33 entries
sources   : 769 entries<jupyter_text>Unique source names<jupyter_code>p = a.query(nchan='>0')
s = p['target_name'].unique()
print(len(s),' unique sources: ',s)<jupyter_output>select * from alma inner join win on (win.a_id = alma.id)  WHERE win.nchan>=0.0 

8  unique sources:  ['NGC3049' 'NGC3504' 'NGC3593' 'NGC4402' 'NGC4414' 'NGC5253' '5-NGC3773'
 '50kms']<jupyter_text>Unique lines detected<jupyter_code>p = a.query(nchan='>2',mom0flux='>0')
print(len(p))
f=p['formula'].unique()
print(len(f),'unique lines: ',f)<jupyter_output>select * from alma inner join win on (win.a_id = alma.id)  inner join lines on (lines.w_id = win.id )  WHERE win.nchan>=2.0 AND lines.mom0flux>=0.0 

33
13 unique lines:  ['H2COH+' 'HCOOH' 'CH3CH2OH' 'CO' 'CS' 'CH3COOH' 'CH3CH2CN' 'CH2DCCH'
 'H2NCH2CN' 'CH2CHCHO' 'SO2' 'HCCCH' 'CH2OHCHO']<jupyter_text>Orphaned lines and sourcesAnother quaint side effect of the way source and line detections are done, is that one can have a line detection and no source detection, and perhaps vice versa. How often does this occur in our sample?Because we detect sources in the CubeSum, independant of the line detection, such orphans are not impossible, and point to extended weak source emission, and sources with weak lines.<jupyter_code># number of spectral cubes and cont maps
pl=a.query(nchan='>2')
pc=a.query(nchan=1)
#  various orphans: lines with no sources, sources with no lines
ps0=a.query(nchan='>2',nlines='>1',nsources=0)
ps1=a.query(nchan='>2',nlines='>1')
pl0=a.query(nchan='>2',nlines=0,nsources='>1')
print("Continuum maps:                      ",len(pc))
print('Spectral Line Cube:                  ',len(pl))
print('  w/ Line detections:                ',len(ps1))
print('  w/ Line detections with no sources:',len(ps0))
print('  w/ Source detections with no lines:',len(pl0))<jupyter_output>Continuum maps:                       69
Spectral Line Cube:                   54
  w/ Line detections:                 30
  w/ Line detections with no sources: 12
  w/ Source detections with no lines: 2
{'fraction_non_alphanumeric': 0.1296228487733431, 'fraction_numerical': 0.04357378249725375, 'mean_word_length': 4.431411530815109, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '378773', 'license': 'MIT', 'n_tokens_mistral': 1078, 'n_tokens_neox': 981, 'n_words': 276, 'path': 'notebooks/case6a.ipynb', 'repo_name': 'teuben/study7', 'size': '2731'}