Skip to content

Instantly share code, notes, and snippets.

@thespacedoctor
Created December 27, 2017 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thespacedoctor/2359f8bd1822018699bbbc0bdecc0a54 to your computer and use it in GitHub Desktop.
Save thespacedoctor/2359f8bd1822018699bbbc0bdecc0a54 to your computer and use it in GitHub Desktop.
[EFOSC SOFI Spectrum Counts for ESO Phase III] #phase_iii #efosc #sofi #spectrum #followup

How to Scrape the Data for the EFOSC SOFI Spectra for followed objects for ESO Phase III Release Description.

This will get you something like this:

Repeat this for SOFI spectra and export into an excel sheet and sort for the release description

-- Here is the SQL query to grab the followup objects:
SELECT
p.transientBucketId, s.masterName
FROM
pesstoObjects p,
transientBucketSummaries s
WHERE
p.marshallWorkflowLocation LIKE '%follow%'
AND p.marshallWorkflowLocation NOT LIKE 'revi%'
AND p.transientBucketId = s.transientBucketId
ORDER BY s.transientBucketId;
--- And once you have the `transientBucketId`s from the query above:
SELECT
object as "Target", concat(COUNT(object), "x", DISPELEM) as "Number of Spectra"
FROM
efosc_spectra
WHERE
data_rel = 'ssdr2'
AND currentFilename LIKE '%_sb.fits'
AND transientBucketId IN (85 , 407,
1472,
1475,
...
394311)
GROUP BY object , dispelem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment