1 / 24

CRICOS provider 00111D

(Almost) Everything you wanted to know about using S2PLOT to visualise astronomy datasets... Workshop. CRICOS provider 00111D. Christopher Fluke & David Barnes.

evalentine
Download Presentation

CRICOS provider 00111D

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. (Almost) Everything you wanted to know about using S2PLOT to visualise astronomy datasets...Workshop CRICOS provider 00111D Christopher Fluke & David Barnes “Those not properly initiated into the mysteries of visualisation research often seek to understand the images rather than appreciate their beauty...” Al Globus & Eric Raible (1994)

  2. Overview • In this session, you will receive a hands-on introduction to S2PLOT programming. This will include the basics of an S2PLOT program, the standard graphics primitives, and how to create more complex applications using the power of the S2PLOT callback system. • Disclaimer: I am a C-programmer (and a vi user) and my bias is shown in the examples. • S2PLOT is also available for FORTRAN and Python.

  3. Outline • Discuss some of your 3-d data • Get s2plot running on your laptop • Try out some of the basic functions • Change parameters • Look at callbacks • Handles • Isosurfaces • Volume rendering

  4. Brunner et al. (2001): Imaging data: 2D, narrow , fixed epoch Catalogs: secondary parameters determined from processing (coordinates, fluxes, sizes, etc). Spectroscopic data and products (e.g. redshifts, chemical composition). Studies in the time domain - moving objects, variable and transient sources (synoptic surveys) Numerical simulations from theory Astronomical Data

  5. What is your data like? • Discuss...

  6. Get s2plot running on your laptop • Instructions at: • http://astronomy.swin.edu.au/s2plot • or (Mac OS X Leopard) • http://www.physics.umanitoba.ca/~english/vizATNF/s2plotSetup_cf.txt • Download sample code: • gunzip ATNF_3DWorkshop.tar.gz • tar -xvf ATNF_3DWorkshop.tar • cd ATNF_3DWorkshop

  7. Basic functionality • Try out some of the basic functions. • Either: • 1. Get sample code from function reference at • http://astronomy.swin.edu.au/s2plot • or • 2. Copy from ${S2PATH}/functions • cbuild.csh <code>

  8. Initialise Create geometry lists Register Callback Functions S2PLOT Program Flow Handle Window Events GLUTMAINLOOP Handle User Events Call Callbacks Draw Geometry using OpenGL lists

  9. For those of you who are not C-programmers... Header files • #include <stdio.h> • #include <stdlib.h> • int main(int argc, char *argv[]) • { • int I, N; • N = 20; • for (I=0;I<N;I++) { • if (I != 4) { • printf(“hello world %d\n”, I); • } else { • printf(“time for a change?\n”); • } • } • return 1; • } All programs must have a main function Declare variables Assignment Looping Logical Tests Output to terminal { } pairs - control structures (Most) Commands end with semi-colon ;

  10. Building S2PLOT code • cp src/s2hello.c . • [EDIT] s2hello.c • cbuild.csh s2hello • ./s2hello When prompted for a Graphics device type, hit <enter> Not very exciting is it? :)

  11. Example • 1. Try changing the values of xmin,xmax etc. • 2. Try changing the values of x, y, z • 3. Try changing the value of ptype • 4. See if you can add some more points at random locations in the box

  12. Example: geometry • cp src/s2geometry.c . • cbuild.csh s2geometry • ./s2geometry • [EDIT] s2geometry.c For more geometry, see http://astronomy.swin.edu.au/s2plot

  13. Plotting transmission curves • cp src/filters1.c . • cbuild.csh filters1.c • ./filters1 • [EDIT] filters1.c Notice anything wrong?

  14. cp src/filters2.c . • cbuild.csh filters2.c • ./filters2 • [EDIT] filters2.c TASK: Draw line segments rather than points TASK: Try and add some more labels

  15. cp src/landolt1.c . • cbuild.csh landolt1.c • ./landolt1 • [EDIT] landolt1.c TASK: Experiment with changing the parameters that are plotted.

  16. cp src/landolt2.c . • cbuild.csh landolt2.c • ./landolt2 • [EDIT] landolt2.c TASK: Make the points a bit thicker Wouldn’t it be nice to know more about those outliers?

  17. Dynamic geometry via callbacks • cp src/landolt3.c . • cbuild.csh landolt3.c • ./landolt3 • [EDIT] landolt3.c Use Shift-S to toggle handles Use Shift-C to display cross-hairs De/Select with right mouse button TASK: Replace s2textxy strings with billboard text

  18. Isosurfaces & Volume Rendering • cp src/volumes.c . • cbuild.csh volumes • ./volumes • [EDIT] volumes Press <space> to switch between: • Points only • Volume render • Isosurface TASK: Edit volumes.c and change slope, level and colour map (s2icm).

  19. The Next Step • Now that you’ve had a chance to experiment with the basics of S2PLOT, let’s talk about your 3-d visualization needs...

  20. Me: cfluke@swin.edu.au • Web-site: http://astronomy.swin.edu.au/s2plot • Google Group: http://groups.google.com/group/s2plot • Please send me your images for the gallery: • http://astronomy.swin.edu.au/s2plot/index.php?title=S2PLOT:Gallery • If you use S2PLOT to help your research, we would appreciate the following acknowledgement in your paper(s): • Three-dimensional visualisation was conducted with the S2PLOT progamming library • and a reference to • D.G.Barnes, C.J.Fluke, P.D.Bourke & O.T.Parry, 2006, Publications of the Astronomical Society of Australia, 23(2), 82-93.

More Related