1 / 14

Data analysis by querying

Data analysis by querying. … and more Lorentz center, Wednesday, 16 November 2005. Python queries. Seamless integration of database and data reduction DB backend independent Search for raw and reduced calibration and science objects Attributes satisfying certain criteria

darin
Download Presentation

Data analysis by querying

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data analysis by querying … and more Lorentz center, Wednesday, 16 November 2005

  2. Python queries • Seamless integration of database and data reduction • DB backend independent • Search for raw and reduced calibration and science objects • Attributes satisfying certain criteria • Dependencies satisfying certain criteria • Sometimes SQL is better suited • Grouping • Finding objects on which others depend

  3. examples f = (Filter.name == '#841')[0] m = MasterFlatFrame.filter == f ReducedScienceFrame.flat == m[41]

  4. SQL • Oracle 10g • Syntax • Standards compliant • Oracle specific extra's • PL/SQL • Function and procedures • Methods

  5. Astro-Wise • Persistent Python objects • User-defined TYPEs and REFerences • ObjectTABLEs and VIEWs • Python class User-defined TYPE • Python object Object TABLE • len(RawScienceFrame.imstat.stdev < 10.0)SELECT COUNT(*)FROM AWOPER."RawScienceFrame" TWHERE T."imstat"."stdev" < 10.0;

  6. examples • Pythonlen(RawScienceFrame.imstat.stdev < 10.0) • Oracle SQLSELECT COUNT(*)FROM AWOPER."RawScienceFrame" TWHERE T."imstat"."stdev" < 10.0; • SELECT T."imstat"."stdev" x , T."flat"."imstat"."stdev" yFROM AWOPER."ReducedScienceFrame" TWHERE T."chip"."name"='ccd53' AND T."filter"."name"='#843' • Start with dbview.astro-wise.org

  7. Context • Handling large amounts of data • Work together • Work in a consistent way • Experiment with source code • Know what data and code was used • Keep data private • Make data public • Throw away data

  8. Context • Organize in Projects, that have • A name and description • Users • Default privileges • Responsible - privileged – users • New objects are automatically part of the currently active context • Tools to safely delete or publish data • Be aware of dependencies for history tracking

  9. Context • User – Project – Astro-Wise … • Setting a project can make more data visible to a user • Setting an instrument can make less data visible to a user • Queries are more suited for some uses of context • Make it easy to query on user and project from awe

  10. examples from astro.database.Context import context context.set_project('WORKSHOP2005') context.set_project('OCAM ILT') context.get_projects() context.get_current_project().name CALL AWOPER.AWSECURITY.SET_PROJECT('OCAM ILT')

  11. Federation • Goal • Distribute data • Distribute queries • Avoid copying data • Available database technology • Non-existent • Oracle technology • Streams • Advanced Replication • Datapump

  12. Federation • Short time-scale – this year • Datapump, low frequency, 1/day • Medium time-scale – Q2 next year • Advanced Replication • Streams • Long time-scale - > Q2 next year • Streams • Distributed data and querying

  13. Code versions • Tag code and objects • Difficult to know with which code a number was exactly calculated • Set version tags strategically • Objects get version from the module in which their class is defined • Might be sufficient in many cases

  14. Finally … … be creative

More Related