Astronomy&Astrophysicsmanuscriptno.paper (cid:13)c ESO2009 January22,2009 Cloud Cosmology : Building the Web Interface for iCosmo T.D.Kitching1,A.Amara2,A.Rassat3,A.Refregier3 1 OxfordAstrophysics,DepartmentofPhysics,KebleRoad,Oxford,OX13RH,UnitedKingdom 2 DepartmentofPhysics,ETHZurich,Wolfgang-Pauli-Strasse16,CH-8093Zurich,Switzerland 9 3 IRFU-SAP,Serviced’Astrophysique,CEA-Saclay,F-91191GifsurYvetteCedex,France 0 0 Submitted:January22,2009 2 ABSTRACT n a J Aims.Astronomy and cosmology have embraced the internet. We routinely and successfully use the internet as a repository for sharing code, publications and information, and as a computational resource. However the interactive nature of the web, for use 1 as an alternative to downloading code has been largely overlooked. In this articlewe will outline a simple framework in which a 2 cosmologicalcodecanbeturnedintoaninteractivewebinterface.Thisispresentedasaresultofcreatingwww.icosmo.orgwhich isafront-endfortheopen-sourcesoftwareiCosmo. ] M Methods.WeexplainhowanHTMLpagecanbecreatedandhowacosmologicalcodecanbeincorporatedintoawebenvironment usingCGIscripts.Weoutlinehowplotsanddownloadabletextcanbemade,anddescribehowhelpanddocumentationcanbecreated. I Results.ByusingsimpleHTMLandCGIscriptsabasicwebinterfaceforanycosmologicalcodecanbecreatedeasily.Weprovide . h aworkedexampleofthemethodsoutlined,whichcanbeusedasasimpletemplatebyanyresearcherwhowantstosharetheirwork p online. - o Keywords.cosmology–observables–numericalmethods r t s a 1. Introduction tionalfarm(asourceofCPU’sorpeopleusedforaspecificsuite [ ofproblems),orasasimplerepositoryfordataorcode,towards Theinternethasbeguntorevolutionisethewaythatastronomi- 1 amodeinwhichtheinteractivityoftheinternetisharnessedto calresearchisconducted.Onlinepaperarchives(e.gthearXiv1) v maketheactofperformingusefulcosmologicalcalculationsan have allowed for the dissemination of articles and results, and 3 online,interactiveexperience.Cloudcomputingisthetermthat 4 data(e.g.SDSS2 Adelman-McCarthyetal.,2006)areroutinely isgiventotheprocessofusinganon-localanonymousmachine 1 made publicly available online for anyone to analyse. We of toperformcomputationaltasks.Wecalltheonlinecomputation 3 course use the internet to communicate via email, voice and ofcosmologicalproductscloudcosmology. . video connections.More recently there have been some efforts 1 tousetheresourcesoftheinternettoaidinthecalculationofa Cosmological calculations were originally done using sim- 0 9 specificsuiteofscientificresults;forexampletheGalaxyZoo3 ply paper and pencil. The advent of the computer made more 0 (Lintottetal.2008)andcosmology@home4bothofwhichsolve complexcalculationsquickerandeasier to compute.Theinter- : particular problems of concern for the authors and simultane- nethasenabledcodetobesharedbetweenthecommunity,and v ouslyserveasremarkableoutreachprogrammes. the next step in this evolution is so create an interface for the i X The open source code made available through the internet codeitselfontheinternet. hasenabledcosmologiststousethiscode,savingtheirtimetodo r The danger in creating web-interfaces for complex code is a furtherresearch.OfparticularnotearetheCMBpowerspectrum that a ‘black box’ mentality is encouraged. In this article we codesCMBfast(Zaldarriaga& Seljak, 2000)and CAMB (Lewis strongly advocate the opposite approach and work within the et al., 2000) and some likelihood analysis codes for example philosophythateverythingcreatedshouldbea‘transparentbox’ COSMOMC(Lewis&Bridle,2002)andBAYESYS5. by which we mean that the code powering the site should al- Howevertherehavebeenrelativelyfewonlineresourcesthat ways be made available and thatdocumentationexplainingthe cosmologistscanuseintheirresearchasareplacementtodown- calculationsandthecodeshouldbeprovided. loadingcode.NotableandexcellentexceptionsincludetheCMB LAMBDA6toolbox,andtheimpressiveonlinedatareductionin- The aim of this article is to guide the reader through the terfaceAstroWISE7,therearealsosomebasiccosmologycalcu- process of turning an open source code into a web interface. lators(e.g.Wright,2006).Theuseoftheinternetinthisfashion This will be done within the context of presenting the interac- heralds the move away from using the internet as a computa- tive tools on http://www.icosmo.org that we have created as a front-end web interface for the open source code iCosmo 1 http://arxiv.org/ (Refregier et al., 2008). The website allows cosmological dis- 2 http://www.sdss.org/ tances, Hubble parameter, growth factor, linear and non-linear 3 http://www.galaxyzoo.org/ matter power spectra, cosmic shear power spectra, baryon dis- 4 http://www.cosmologyathome.org/ tancescales,supernovaemagnitudedistances;andlensing,BAO 5 http://www.inference.phy.cam.ac.uk/bayesys/ and supernovaeFisher matricesto be calculated onlinein real- 6 http://lambda.gsfc.nasa.gov/toolbox time. In addition to the interactive web pages, there are links 7 http://www.astro-wise.org/ to the open source iCosmo code and to some tutorial/teaching 2 T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo resources for cosmology and the probes used to measure cos- it is the web browser that does the compiling when a particu- mology. lar page is loaded. HTML pages can be created in most word- In this article, we will notdescribe all possible ways thata processing or text based programmes (e.g. MS Word, Emacs, webinterfacecouldbecreated.Wewillpresenttheprocessfrom etc.) and just save the file with the extension.html.The web- theperspectiveofcosmologists(whoarenotexpertsinwebde- pagecan then be viewedby typingin the path to the file. Note sign)whowanttomaketheircodeeasilyaccessibletoawideau- that when a browser calls a webpage it does so as an exter- dienceandwantaneasyandquickwaytomakecodeavailable. nal user, so permissions on any files need to be such that a Wewillbeginbydescribingtherequirementsthataworkingcos- global user can execute the HTML code (e.g. in UNIX using mologistmay needfroman interactivewebinterface.Then we the chmod command). In general one must be careful about will describe the particular solution that we have used, along permissions, if a file is writable by a global user then a mali- withsomealternativesthatwehaveinvestigatedalongtheway. cious user could turn such a file into a virus. However if a file Thiswillbewritteninapedagogicalstylefromthepointofview is writable but not executable this makes such an attack much ofanon-expertincomputerscience. moredifficult,indevelopingiCosmowefollowedtheguidelines TheiCosmoHTMLandCGIwillbereleasediniCosmov1.2 set out on this webpage http://www.oucs.ox.ac.uk/web/ (http://icosmo.pbwiki.com). A description of the interac- faq/index.xml.ID=safeperl. tivefeaturesofthewebsitearegiveninAppendixA. AverysimpleHTMLpageisshownhere: <HTML> 2. Websolutions <head> <title>Hello World</title> The needs of the cosmological community are not entirely </head> unique to science but are fairly representative in terms of the <body> types of productthat are required from a useful web interface. <font color="yellow"> We willexplainthe requirementsthatwe needas cosmologists Hello World andthenstepthroughthesolutionsthatwehavefound. </font> </body> 2.1.RequirementsfromCosmology </HTML> Tobeatruereplacementtodownloadingcodethewebinterface The first line declares that this is an HTML code, and the mustbe able to performthe majority of the actions, and create lastlineistheendthecode.Theheadcontainsinformationthat alltheproducts,thatonemaywishtomakeusingthecode. will not appear on the page itself but may affect its attributes. Ausermustbeabletochangetheinputseasily.Incosmology The body contains information that will appear on the page, these are commonly values of cosmological parameters. There here there is a simple style change made to the font of the arealsosomenumericallimitsandresolutionsofparticularvari- text shown. We have found that the following pages were ablesonwhichcosmologicalfunctionsdepend;forexamplered- particularlyusefulindocumentingtheHTMLsyntax shiftz,wavenumberk,azimuthalwavenumberℓ. The two most useful end-point products are the plot (or – http://www.w3schools.com/html/DEFAULT.asp graph)thatcanbeusedtovisuallyrepresentsomefunctionalbe- – http://www.htmlgoodies.com/ haviour,andatableofthedatainthegraphinaformatthatcan – http://www.htmlcodetutorial.com/ thenbeusedinsubsequentprogrammes.Thegraphicalinterface – http://en.wikipedia.org/wiki/HTML should be flexible enough that any aspect of the graph can be though this is by no means an exhaustive list and typing in tailoredonline to the users needs.In cosmologywe often need HTMLand a problemintoanysearchengineusuallyresultsin toplotfunctionsformultiplevaluesofcosmologicalparameters findingthesolutionveryquickly.TocheckthattheHTMLpage includingerrorbars. thatyouhavewrittenisvalid(nobugs)thereisanonlineHTML The iCosmocode (Refregieret al., 2008)is a low-redshift, compiler that will highlightany problemsor inconsistenciesat darkUniverse,cosmologytoolthatallowsa userto createcos- http://validator.w3.org/– to use this the website needs mologicalfunctions,observablesandparameterforecastsforar- tobeonline. bitrarycosmologiesand experimentaldesigns. Our task was to Writing‘bare’HTMLallowsthewebpagetobeexactlytai- turnthisintoaninteractivewebinterface. loredtoyourneeds,howeveritisatimeconsumingactivityand A simple demonstration of the procedures covered in this thesyntaxneededtocreatecomplexdisplayscanbecomecum- Sectionareshownon bersome.Thankfullytherearesomeverygoodwebsitecreators – http://www.icosmo.org/WebPaper.html availablethatallowwebsitestobecreatedinmuchthesameway – http://www.icosmo.org/cgi-bin/WebPaper.cgi thata“PowerPoint”(orKeynote)presentationismadee.g.cre- atingtexboxes,changingfontsandcolours,addingpicturesetc. andinAppendixB,theseexamplescanbeusedasatemplateto ForthefrontendoftheiCosmositeweusediWebforMacOSX, createnewcosmologicalwebinterfaces. forWindowsthereisFrontPage,andthereareevenonlineweb- pagecreatorssuchasGoogleSites. To enable moreadvancedfeaturesin a webpageone has to 2.2.HTML usescripts.Therearedifferenttypesofscript,thosethatcanbe HTML(HyperTextMarkupLanguage)isthelanguageinwhich run within HTML itself and those that cannot. In iCosmo we web pagesare written. A website consists of a groupof pages, haveusedsomein-HTMLJAVAscriptstoenablesomeadvanced usually in some directory structure. HTML is akin to the fa- features,forexamplethetabbedenvironment(seeAppendixA) miliar Latex typesetting language in which a script is written and some more simple things like allowing all checkboxes to and then compiled to create a document. In this case however be selected at once (see Section 2.6). These in-HTML scripts T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo 3 are defined in the <head> section of the HTML and are ini- </head> tialised using <script language=javascript> and ended <body> using </script>, there are many open-source javascript wid- <font color="yellow"> gets which can be copied and pasted from the web into any Hello World HTMLpage. </font> HTML #this is a comment 2.3.RunningScripts #do a simple calculation in PERL $x=2*2+2*2*2; In creating a web interface for cosmology one will inevitably #display the calculation on the webpage have to run some sort of programme that will take inputs (say print<<HTML; cosmologicalparameters) and performa cosmologicalcalcula- 2<sup>2</sup>+2<sup>3</sup>=$x tion.Runninganexecutable,orscript,canbedoneeitheronthe HTML sideoftheserver(wherethewebpageisstored,seeSection2.4) #end the HTML orcanbedonethroughthebrowseritselfonthe‘client’side.We print<<HTML; opted for, and recommend,the server-side approachsince cos- </body> mologicalcalculationscanbecomplex(aclientscomputational </HTML> powermaybeminimal)andserversidescriptsaresaferforthe HTML client(theydonotneedtoruna potentiallydangerouscodeon exit; theirpersonalmachine). There are a number of ways which we encountered that allowscriptstoberun.MostsimplyanyCcodecanbecompiled which can be run in a browser by typing the executable name The first line declares that this is a PERL script. The into the command line, though creating an entire webpage out print<<HTML then says “the following is HTML” where of a C code quickly becomes complex. Alternatively one can use JAVA8 and then create a “Applet” (althoughthis is a client the header is created. Calculations can then be done in PERL anddisplayedon the webpage,in thisverysimple examplewe side solution). Other alternatives include PHP and API which calculated 22 + 23. We also show here an example CGI shell areadditionstoHTMLthatallowscriptstoberunfromwithin HTML. An example C code, compiled like gcc test.c -o script: test.cgiisgivenbelow: 1 #!/bin/sh 2 # xmltest.sh 1 #include <stdio.h> 3 # XML-based "Hello World" 2 int main(void) { 4 echo Content-type: text/xml 3 float p,q,r; 5 echo 4 p=2.*2.; 6 echo "<?xml version=\"1.0\" 5 q=2.*2.*.2; encoding=\"UTF-8\"?>" 6 r=p+q; 7 echo "<message>" 7 printf("Content-Type: text/plain; 8 echo "<text>Hello World!</text>" charset=us-ascii\n\n"); 9 echo "</message>" 8 printf("Hello world\n\n"); 10 exit 0 9 printf("2*2+2*2*2=%f\n",r); 10 return 0; 11 } The easiest solution that we have found is to use CGI 2.4.Servers,URLs,IPAddresses (Common Gateway Interface) scripts. These are executable scripts(akintoamorecomplicatedversionofashellscript)that A webpage is hosted on a server which, as far as we are con- canbewritteninavarietyofdifferentcodelanguages.Whena cerned, is essentially a computer with some specific software CGI script’s URL is called the server runs the CGI script, that installedthatallowsCGIscriptstoberun,andonwhichtheweb createsawebpagewhichisthendisplayed.Themostcommon site resides. When you click on the URL of any webpage the language in which CGI scripts are written, and the one which browserwillberedirectedtoaserver,forasimplewebpagethe we have chosen for iCosmo, is PERL9. For iCosmo we chose browserwilldownloadthewebpageHTMLfromtheserverand PERL over Shell scripts because PERL is a full programming displayit,foraCGIscripttheserverwillrunthescriptandthen language with many available libraries, and as such is some- sendthe HTML createdto the usersbrowser.Serversarenoth- whatmoreflexible.AnexamplePERLCGIscriptisshownhere: ingmorethananormalcomputerswithextrasoftwareinstalled, indeedevena laptopcan becomea server(thisis actuallyvery #!/usr/bin/perl easywithsomerecentoperatingsystemse.g.MacOSXLeopard, print<<HTML; where serversoftware is includedas standard).The most com- <HTML> monformofserversoftwareisApache10.Awebpageonaserver <head> typically consists of a number of folders : one containing the <title>Hello World</title> staticpages(frontpageofwebsiteetc.),onecontainingtheCGI scripts,onecontainingsomesharedfiles. 8 http://java.com/en/ 9 http://www.perl.com 10 http://www.apache.org/ 4 T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo ForiCosmowedevelopedthesiteusingApacheinstalledon print<<HTML; aMacBooklaptop,toturnthelaptopintoaserveralloneneeds <HTML> to do is turn on “web sharing” once Apache is installed. Later <head> wetransferedthesitetoadedicatedserver. <title>Hello World</title> Every computer and every server connected to the inter- </head> net has a unique numerical indentifier called an IP (Internet <body> Protocol) address. To connect to a servers website from a <font color="yellow"> browser the IP address of the server needs to be known. The Hello World keythingtorealisehereisthatIPaddresses(computers/servers) </font> useports,throughwhichtheycommunicate.Whentwocomput- HTML ers interact the IP address says where the machine is, the port #this is a comment sayswhattypeofinteractionwilloccur.HTML webpagesuse #do a simple calculation in PERL port 80. So the server needs to have port 80 open to allow IP $x=2*2+2*2*2; addressestoaccessesHTMLpagesstoredontheserver. #display the calculation on the webpage If a computer is connected to a network then it may have print<<HTML; an internal IP for the network and the router will have an ex- 2<sup>2</sup>+2<sup>3</sup>=$x ternalIPaddress.Whendevelopingawebsiteathome,through HTML arouterforinstance,therouterssoftwareshouldbechangedto openport80.Thereisa veryusefulwebsiteherethatwillpro- use IPC::Open3; videastep-by-stepguidetodothisforalmostanyrouteravail- $ENV{’PATH’} = ’/Applications/itt/idl70/bin/’; ablehttp://www.PortForward.com,therouterthenneedsto $progName = "idl"; re-routeanyincomingtrafficthroughtheportto theinternalIP open3(WRITEIDL,READIDL,ERRORIDL, $progName); of the machine. Once port 80 is open then typing in the exter- print WRITEIDL "x=2ˆ2+2ˆ3+2ˆ4 \n"; nal IP to a web browser will take the browser to your servers print WRITEIDL "print,x \n"; webpage. $y =<READIDL>; AURL(UniformResourceLocator)isanalpha-numericre- print<<HTML; placement for an IP address. When developing a website you 2<sup>2</sup>+2<sup>3</sup>+2<sup>4</sup>=$y will be able to use the IP as an address for the webpage e.g. HTML typing http://193.168.0.1will take you to your webpage. #end the HTML If you want to create a URL instead of using the IP address print<<HTML; then DNS (Domain Name System) server can be used which </body> will reroute any traffic using a given URL to your IP address. </HTML> There are a number of free services that do this, when de- HTML veloping iCosmo we used DynDNS www.dyndns.com which close(WRITEIDL); is a dynamical DNS server. Dynamical servers are particu- close(READIDL); larly useful if your IP address may change over time, this is close(ERRORIDL); almost always the case for a home computer that is linked exit; to the internet via an ISP (Internet Service Provider). Later, once your website is at a mature stage more suitable domain namescanbebought,foriCosmoweusedthecommonservice http://www.123reg.com. In this example an IDL script is initialised by the Open3 command, when the command WRITEIDL is called (which is named as the inputto the IDL) actual IDL commandlines can 2.5.LanguageChoice be entered which can then be read back into the PERL script using READIDL. The result can then be printed into an HTML Whendevelopingawebinterface,andanopensourcesoftware package,thechoiceofacodinglanguageisimportant.iCosmo pageintheusualway.Notethatanycodepackagecouldberun inthisway,weuseIDLasanexample. iswritteninIDL,whichimmediatelycreatedsomeobstaclesto creatinga web interfacesince IDL cannotbe run directlyfrom within a CGI script. Languages which are more conducive to web interface programming are C (which can be run directly within a browser), JAVA, PERL and python. One option for You may want to run some code on a machine that is iCosmowasthereforetore-codethe entirepackageintosome- not the server. For example this may occur if you cannot in- thinglikeJAVAorC,howeverthiswouldhavemeantlosingthe stall some particular library or if more computing power is featuresforwhichwechoseIDLinthefirstplace–easysyntax, needed. The IPC::Open command can be used so that when vastscientificlibraries,easyplottingroutines. a particular CGI script is run the server can ssh into a ma- When developing iCosmo we found a way to call any chine that has the required software, perform the calcula- programme from within a PERL CGI script. IPC::Open311 (or tion on that machine and then output the results to the web- Open2) creates a “child” process from the main PERL script page. This is done by stacking the commands on the $prog- whichthenruns(onthecommandline)andcanreturnvaluesto Name line e.g. $progName = "ssh server@machine ’cd thePERLscript.Anexampleisgivenbelow: WebServer/CGI-Executables; command’" which connects toamachineundertheusernameserver,changesdirectorytothe #!/usr/bin/perl CGI folder and then runs some command. Most servers should come with some common software already installed, although 11 http://www.perl.com/doc/manual/html/lib/IPC/Open3.htmlinstallingsomecomplexastronomicalsoftwaremaybedifficult. T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo 5 2.6.InputandOutput pgscr(0, 1.0, 1.0, 1.0); pgscr(1, 0.0, 0.0, 0.0); We have now outlined how to create a simple webpage and a CGIscriptthatcanrunaparticularcosmologycodeandoutput pgsci($linecolour); resultstoawebpageinatextformat.Herewillwilldiscusshow pgline($number, @x, @y); inputscanbetakenfromawebpageandputintoaCGIscript. pgend; The key to web interactivity is the HTML form. Forms allowawebusertoinputinformationintoawebpagewhichcan thenbereadbytheserver.Youwillfindformsonalmostevery This would create a gif showing the data in the arrays @x web page (from online shops to airline bookings). A form is [email protected] basically a set of inputs and a ‘submit’ button (forms can also canbeused be automatically submitted – using javascript) when a form is submittedanewscriptisrunwhichisgiventhevariablesinput <img src="icosmo plot.gif" width="500px" alt=""/> asarguments.Thefollowingexamplewouldcreatesomeboxes inwhichnumberscouldbeinputandthensentto thenewCGI script. To create a downloadable text file the following PERL syntaxwouldwritethestructures$xand$ytoafile <form action="cgi-bin/newscript.cgi" > <input type="text" name="omega m" size="5" $file="file.txt"; value=0.3> open (MYFILE, $file); <input type="text" name="omega de" size="5" for($start=1;$start<$number;$start++){ value=0.7> <input name="submit" type="submit" value="Begin $valueF=$x[$start]; Calculations"> printf MYFILE "$valueF"; </form> $valueF=$y[$start]; printf MYFILE "$valueF \n"; The variables omega m and omega de are submitted to } newscript.cgi(the variablescan be seen in the URL delim- ited by &’s or can be hidden using METHOD=“POST” in the ThefollowingHTMLwouldcreatealinktofile.txt firstline).Therearemanytypesofforminputthemostcommon are <a href=’file.txt’> Download Text Output</a> – text:inputatextvalue,numericaloralphabetical – checkbox:atick-boxwhichcantakeoneoftwovaluesde- pendingonwhetheritisselectedornot – radio:anexclusive‘or’i.e.valuecantakeanumberofdif- 2.7.BrowsersandStyling ferentvalues – select:adrop-downboxiscreatedwhichgivesanumberof When creating a web interface one must always be care- exclusiveoptions ful with respect to browser compatibility. Issues can arise from even simple things such as choosing a font such that Thereisextensiveonlinehelpforallthesetypesofforminput. it will appear the same in each browser (we found this In iCosmoto read form data into a CGI script we used the website particularly useful http://dustinbrewer.com/ ReadParsePERLcommandwhichworksinthefollowingway fonts-on-the-web-and-a-list-of-web-safe-fonts/, there are only a handful of fonts available) to an entire page &ReadParse(*input); appearingincorrectly. $omm = $input’omega m’; Incompatibility issues are usually created when obsolete $omv = $input’omega de’; HTML methods are used, this means that some new browsers will not recognise certain HTML commands and will render them in a differentway than intended. The most up-to-date(c. which would read in the submitted variables from above 2008)standardforwritingbrowser-proofHTMListousestyles. intothenewPERLscriptasthevariables$ommand$omv. TocreateplotsusingPERLweusedthecommonPGPLOT12 Stylesareessentiallysmallscriptsthatcanbewrittensepa- software (we installed this foruse in PERL using the excellent rately(intheheader)orwithincertainbasicHTMLcommands astronomical suite of tools provided by SciKARL13). Within thattell the browserhow to renderthe objectin question- that PERLaplotcaneasilybecreatedusingthefollowingsyntaxor couldbesometext,atable,animageetc.Ansimpleexampleis similar givenbelow #Create a graph: <a href="http://www.icosmo.org"><font $ENV{’PGPLOT PS BBOX’} = "MAX"; color="#66000">iCosmo</font></a> pgbegin(0,"icosmoplot.gif/gif",1,1); pubplot($xmin,$xmax,$ymin,$ymax,0); <a style="color: #660000" #black-on-white plots: href="http://www.icosmo.org">iCosmo</a> 12 www.astro.caltech.edu/∼tjp/pgplot/ 13 http://astronomy.swin.edu.au/∼karl/SciKarl These two lines ostensibly do the same thing (create a red 6 T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo coloured hyperlink to iCosmo) but the first line does not use Finallyvideo(oraudio)tutorialscanbeprovidedinaddition stylesandassuchmayappearincorrectinsomebrowsers. totextbasedandinteractivehelp.Videotutorialscanallowthe Other problemscan occurif, for example,a tableswidth is web site to be demonstrated to the user and for all the aspects definedin%,whichsomebrowsersrecognise,whereasitshould of the site to be presented. For iCosmowe choose YouTubeto be defined in terms of pixels (px). When writing a web in- host the videos online - YouTube also allows videos to easily terface you should constantly check that whatever changes are be embedded directly into HTML. Alternatively you can host made are accurately reproduced in all browsers. This can be you own videos, or publish audio as a pod-cast. To record on- donemanuallybyinstallingsomeofthemostcommonbrowsers screen video and audio there are many cheap software options (Firefox, Opera, Safari, Internet Explorer) or by using an on- available;wechoseiShowUforMac. line browser checker - we found this site particularly useful http://browsershots.org/. 2.10.AWorkedExample Asaworkedexamplewehaveprovidedsomesimpletemplates 2.8.VersionTracking ofanHTMLpageandaCGIpageinAppendixB.Workingver- When creating a web interface keeping track of different ver- sionsofthesecanbefoundon sions, and what changes have been made is important so that – http://www.icosmo.org/WebPaper.html the site can be restored to any point in its creation if thingsgo – http://www.icosmo.org/cgi-bin/WebPaper.cgi wrong.Therearemanycommerciallyavailableandopensource wayswhichcanbackupwebsitesandcode,themostcommonly In these examples we show how each of the components de- usedisSVN(SubVersioN). scribedinthisSectioncanbebroughttogethertocreateasimple For iCosmo,creatinga web site in collaboration,we found cosmologyinterface.Weshowhowstylesandformsareusedas that using a self-made wiki page was the optimalsolution. We well as some other HTML tricks, for exampleinserting an im- used the public wiki pages http://www.pbwiki.comand on age,creatingGreeklettersandmakinglists.IntheCGIexample our iCosmo wiki page created a “Blockbuster” style table. If we take some data from the HTML page and use this data to one personwanted to editthe site they “checkedout” the code performacalculationusingtheiCosmoIDLsoftware. (downloadedasazippedfile),andmadeanoteonthewiki.They Wehaveoutlinedhowtocreateawebinterfaceforcosmol- would then “check in” and upload a new version. All versions ogycalculationsfromscratch.Thiscanbedonebythroughthe are stored on the wiki page and this preventedmultiple people following3steps: workingonthesamecodesimultaneouslyaswellassavingthe oldversionsforbackup. – Create a static HTML site to collect user in- put. This can be done using the forms discus- sion in Section 2.2 or the template provided 2.9.HelpSolutionsandDocumentation http://www.icosmo.org/WebPaper.html. Whencreatingawebinterfaceforcosmology,andfollowingthe – Write a CGI script to run your program ‘transparentbox’approachthatwehavetakenwithiCosmo,suf- (e.g. an IDL .pro file). This is discussed in ficientmaterialshouldbeprovidedandlinkstorelevantpublica- Section 2.6, and an example can be found at tionsmade(attheveryleastlinkstoothersitesthatcontaingood http://www.icosmo.org/cgi-bin/WebPaper.cgi. materialshouldbeadded). – Create an interface for displaying the results. See For iCosmo we have made a multi-layered suite of help http://www.icosmo.org/cgi-bin/WebPaper.cgi for resources. The simplest is to add help directly as text to the anexample webpages in question. Links can easily be made to publica- Someusersmaywish to simplyextendthe capabilityofan tions available on online archives. The next layer is to cre- existingsite,suchasiCosmo,thiscanbedonebyusingthetem- ate more information on a different page and make this an plates provided. The iCosmo website source code will be re- evolving and interactive document. The most common forms leasediniCosmov1.2(http://icosmo.pbwiki.com). of these interactive documents are wiki pages and online word processors (e.g. GoogleDocs).For iCosmowe have used http://www.pbwiki.com to create a number of wiki pages 3. OnlineCosmology that are edited and updated by a group of experts in each field wehavecovered.TheGREAT08challenge(Bridleetal.,2008; Theinternethasbeenharnessedinastronomyandcosmologyas http://www.great08challenge.info) has made good use a communicationtool and as a source of processing power for ofGoogleDocstoprovideonlinedocumentation. individualcalculations.The movetowardsusing the interactiv- The next layer of interactivity is to provide an online ityoftheinternetadvocatedhereissimilarinmotiveandresult forum for users of your site to discuss the science, results tocloudcomputingwherecomputationalprocessesarenotper- and the webpage. In cosmology we are fortunate to have formed locally but within the cloud (remote, anonymous, ma- http://www.cosmocoffee.info. For iCosmo we have pro- chinesontheinternet).Werefertotheuseoftheinternetinthis videdadiscussionforumhostedbycosmocoffee. fashion,forcosmologicalcalculations,ascloudcosmology. Tomakepostingawebsiteontonetworksites(e.g.Facebook, It may appear strange to an expert in web design or cloud MySpace)andbookmarksites(e.g.Twitter,Digg)easyforauser computingthatweareusingtherelativelywellknownCGIap- itiscommontoaddsmalllinksatthebottomofapagethatwill proachtowritingwebpagesasanexampleofcloudcomputing. automatically post to these websites. For iCosmo we used the Howeverthedefinitionofcloudcomputingdoesnotstipulatethe free service providedby http://www.sharethis.comwhich methodbywhichthecloudiscontacted.Weadvocatetheuseof providesasnippetofHTMLthatoncepastedintoawebsitecom- CGIscriptsbecauseoftheirsimplicity,easy-of-useandthevast pressesallthepostinglinksintoonebutton. amountofscientificlibrariesthatareavailableforthem. T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo 7 Otherrecentsuggestionsforusingtheinteractivityofthein- Acknowledgments ternettoincreaseproductivityinastronomyandcosmologyare TDK is supported by the Science and Technology Facilities 3D environmentsand the virtualobservatory.3D environments Council, research grant number E001114. We thank all the (e.g.Hut,2007)canbeusedforoutreachactivitiesandasvisu- iCosmocontributorsFilipeAbdalla,DavidBacon,SarahBridle, alisationtoolsforcomplexdatasets.Theconceptofthevirtual AlainGueguen,BenjaminJoachimi,DanielKubas,JustinRead, observatory (e.g. Szalay & Brunner, 1999) is that astronomers ShaunThomas,JochenWelleraswellasLucaAmendola,Nabila canaccessvastlibrariesofpre-observeddata,whereanydesired Aghanim, Anna Cibinel, Marian Douspis, Robert Feldman, observationhasahighprobabilityofalreadyexisting,thusmak- OliverHahn,AlanHeavens,OferLahav,AndyTaylor.Forhelp ingtheneedforanewobservationredundant. in comparing Fisher matrix calculations we also thank Jiayu Wehaveoutlinedtheparticularsolutionsthatwehavefound Tang, Peter Schneider, Martin Kilbinger, Jan Hartlap, Martin thatwillenablecosmologiststoturntheircodeintoawebinter- Kunz and Fransico Castander. For help in hosting the website face.Lookingaheadweenvisageamovetoamoreopenculture we thankETH Zurichand AxelBeckertfor invaluableand ex- ofsoftwaredisseminationwherenotonlyarticlesarepublished perthelp. butthecodeusedtocreatethescienceinthearticleisalsomade public.Herewedefineanumberoftierspossibleofinvolvement – Asaminimumonecanpublishthecode,relatedtoanarticle, References online. – Secondly the code can be published as part of a coherent Adelman-McCarthyetal.,2006,ApJS162,38 Albrechtetal.,2006,astro-ph/0609591 software package e.g. iCosmo. In this case, in order to be- AmaraA.,RefregierA.,2007,MNRAS,381,1018 comeintegratedintothepackageboththecodeandthesci- BartelmannM.,SchniederP.,2001,Phys.Rept.,340,291,472 ence need to be refereed to some degree to ensure consis- BlakeC.,ParkinsonD.,BassettB.,GlazebrookK.,KunzM.,NicholR.,2006, tency MNRAS,365,255,264 Bridle,B.,etal.,2008,arXiv0802.1214 – Thirdlythecodecanbepublishedandturneditintoawebin- Chevallier,M.;Polarski,D.;2001,IJMPD,10,213 terface,thiscouldbeasanextensionofanexistinginterface DESCollaboration;2005,eprintarXiv:astro-ph/0510346 (e.g. http://www.icosmo.org) or as a stand alone inter- EisenstienD.,HuW.,1997,ApJ.,511,5 face. HeavensA.,2003,MNRAS,343,1327 HeavensA.,KitchingT.,TaylorA.,2006,MNRAS,373,105,120 TheiCosmosourcecodeitself(Refregieretal.,2008)isan HutP.,2007,Prog.Theor.Phys.Suppl.164,38-53 exampleofthethirdtier,bothopensourceandwebinteractivity. HutererD.&TurnerM.,2001,Phys.Rev.,64,123527 Kitchingetal.(2008)(acosmologicalsystematicsinvestigation) HutererD.,etal.,2006,MNRAS,366,101,114 IvezicA.,etal.,2008,eprintarXiv:0805.2366 is an example of the second tier, some source code which has KaiserK.,2004,SPIE,5489,11 been integrated into an existing software package as an addi- Kitching T. D., Amara A., Abdalla F., Joachimi B., Refregier A., 2008, tionalmodule. arXiv:0812.1966 iCosmo can be used as a platform for all three tiers. The LewisA.,ChallinorA.,LasenbyA.;2000,ApJ,538,473,476 LewisA.,BridleS.,2002,Phys.Rev.D66,103511 source code is very modular and can easily be extended, and Linder,E.;2003,Phys.Rev.Lett.,90,091301 because iCosmo is an existing software package new add-on PeacockJ.,DoddsP.,1996,MNRAS,280,19 modulescanbepublishedineachnewrelease.Finallythemeth- RefregierA.,AmaraA.,KitchingT.,RassatA.,2008,submittedtoA&A odsoutlinedinthisarticleshowhowaniCosmomodulecanbe RefregierA.,etal.,2008b,Proc.ofSPIE2008,Marseille,France Smail,I.;Ellis,R.S.;Fitchett,M.J.,1994,MNRAS,270,245 turned into an interactive webpage. New interactive webpages SmithR.E.,etal.,2003,MNRAS,341,1311 couldeitherbeentirelyindependentorcouldbeincorporatedin TegmarkM.,EisensteinD.,HuW.,1998,arXiv:astro-ph/9804168 themainsite. Tegmark,M.;TaylorA.,HeavensA.;1997,ApJ,440,22 TysonA.;2006,AIPC,870,44 RassatA.,etal.2008,arXiv:0810.0003 4. Conclusion SzalayA.,BrunnerR.,1999,FGST,16,63 SNAPCollaboration,2005,eprintarXiv:astro-ph/0507460 Cosmologyhadmadegooduseoftheinternetsofaraseithera WrightN.,2006,PASP,118,1711 publicrepositoryforarticlesandcode,orasalarge-scalecompu- Zaldarriaga,M.;Seljak,U.,2000,ApJS,129,431 tationalfarm.Howevertheinteractivepotentialoftheweb,that canallowcosmologiststoperformcomplexcalculationsonline, hasthusfarbeenlargelyoverlooked. AppendixA: UserGuideforhttp://www.icosmo.org We envisage a move towards cloud cosmology in which InthisAppendixwedescribetheinteractivefeaturesofiCosmo, computationallydemandingandcomplexprocessescanbeper- the products available from the website and how to access the formednon-locally. mainfeaturesofthewebinterface. In this article we have outlined the some simple processes thatwehavelearntinthecreationofanonline,interactive,low- redshift(darkUniverse)cosmologycalculator.Wehaveoutlined A.1.BeginningCalculations howa simple webpage is created,and hosted,andshownhow cosmological code can be turned into an interactive web site. TheiCosmointeractivewebsiteallowsyoutocalculatecosmo- Throughout we have used the example of the interactive web logical functions, cosmology observables and Fisher matrices. site http://www.icosmo.orgwhich is powered by the open These are summarised in Table A.1. We always calculate the source software iCosmo – for a description of the interactive cosmologyfunctions.Thethreedifferentcalculationscopeswill featuresonthissiteseeAppendixA. bedescribedinmoredetailinSectionA.6. Finally we described three levels integration that could be Throughoutallcalculationsweusethefollowingsetofcos- adoptedbyacosmologistwantingtomaketheircodeeasilyac- mologicalparametersΩ ,Ω ,w ,w ,σ ,Ω ,handthespec- m DE 0 a 8 B cessibleonline. tral index n . The curvature density Ω is determined through s K 8 T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo Scope Products CosmologyFunctions Distances,H(z),GrowthFactor LinearPowerSpectrum,Non-LinearPowerSpectrum CosmologyObservables LensingPowerSpectrum,BaryonDistanceScales SupernovaeType-IaMagnitudeDistanceRelation CosmologyErrors LensingFisherMatrix BAOFisherMatrix,SupernovaeType-IaFisherMatrix Table A.1.Therangeofproductsavailableonthewebsite.CosmologyFunctionsarealwayscalculated.Theusercan investigate theeffectofchangingcosmologicalparametersinthecaseofCosmologyFunctionsandCosmologyObservables. Step1allowstheusertospecifythecosmology,orcosmolo- gies(seeSectionA.5)thattheywishtouseinthecalculation.In thissteptherangeofproductsthatwillbecalculatedisalsocho- sen, the productsare arrangedinto the three scopes detailed in TableA.1.Toadvancetothenextstagetheuserclickson“Begin Calculations”. Step2willshowsomefurtheroptionsrelevanttotheprod- ucts chosenin Step 1. The baselineoptionsforthe Cosmology Functionsare the minimum and maximumredshiftfor the dis- tance,Hubbleparameterandgrowthfactorcalculations.Forthe matterpowerspectrumtheminimumandmaximumk-rangeas wellasthefunctionalformusedinthecalculationscanbecho- sen. The types of option available are shown in Table A.2. For Fig.A.1.TheFrontPageoftheiCosmowebsite.TheQuickStart thematterpowerspectrumthelinearformcanbecalculatedus- Calculatorpanelcanbeseeontherighthandside.Toaccessthe ingeitherEisenstien&Hu(1997)(withorwithoutbaryonoscil- stepwiseinteractivepagesclickonthe“CosmologyTools”link lations)orBardeenetal.(1986).Thenon-linearpowerspectrum oronthe“Tools”linkinthenavigationbaracrossthetopofthe canbecalculatedusingeitherPeacock&Dodds(1996)orSmith page. etal.(2003). IfeitherCosmologyObservablesorCosmologyErrorswere choseninStep1thenthechoiceofsurveywillbegiveninStep 2. If “Make Custom” is chosen then the user will be taken to the choice of Ωm and ΩDE where ΩK = 1 − Ωm − ΩDE at all a furtherStep where thesurveyparametersrelevantto thetype times. ofproberequiredcanbecustomised.Alternativelyapre-defined There are two ways in which the interactive part of the surveycan be chosen,the available pre-definedoptionsare de- iCosmowebsitecanbeaccessed.EitherthoughtheQuickStart tailedinSectionA.4. panel on the front page or through a step-by-step process that Step3 will appearif “Make Custom” is selected in Step 2. allowsthe userto customisethe exactscopeand detailsofcal- In Step 3 the user will be shown survey parameters specific to culationsrequired. thetypeofprobethatisrequired,eitherlensing,baryonacoustic oscillations (BAO) or type-Ia supernovae. The details of the optionsavailableforeachoftheprobesare: A.2.QuickStart Lensing: You will find the QuickStart panel on the front page of the iCosmowebsite, see FigureA.1. To startsimply fill in the val- – Theareaofthesurveyinsquaredegrees ues of the cosmological parameters and click on “QuickStart – Thenumbernoftomographicredshiftbinsusedtoconstruct Cosmology”.Youwillbetakentoawaitingpagewhilstthecal- lensingpowerspectra,n(n+1)/2spectrawillbecalculated. culations are performed. When the calculations are completed Note that the bin boundaries will be chosen such that the you will be redirected to the Cosmology Functions interactive numberofgalaxiesineachbinisapproximatelyconstant tabdescribedinSectionA.6. – The surface number density of galaxies in galaxies per squarearcminutethatcanbeusedforacosmicshearanalysis – Theintrinsicvarianceinthemeasuredellipticityofgalaxies, A.3.Step-by-Step here we use the convention that the variance in measured TostartyourcalculationandtochooseCosmologyObservables shearisσ =σ /2asexplainedinBartelmann&Schnieder ǫ γ andErrorsoptionsfromthebeginningtheusercanbeginastep- (2001) wisecustomisationofthecalculationsneeded.Thisisreachedby – The uncertainty δ (z) in the redshift of each galaxy, using z clickingonanyofthelinksto“Tools”onthefrontpage,Figure the common (1 + z) scaling σ (z) = δ (z)(1 + z). A typ- z z A.1, and then clicking on “Interactive Web Tool”. Throughout ical broad band photometric redshift survey should have the stepwise process the user will only be shown options rel- σ (z)/(1+z) ∼ 0.02to0.05whereasaspectroscopicsurvey z evant to the calculations requested, for example if the lensing mayhaveσ (z)/(1+z)<0.001. z powerspectrumor lensingFisher matricesare notrequiredthe – The median redshift for the number density distribution of userwillneverseeanylensing-relatedoptions.Thestructureof galaxies.WeemploythecommonlyusedSmailetal.(1994) thisflowisoutlinedinFigureA.2. formula T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo 9 Supernovae: – Theareaofthesurveyinsquaredegreesthatismultiplyim- agedtoallowsupernovastudies – Thesurfacenumberdensityofsupernovaeinsupernovaeper squarearcminute.Notethatthisdependsonthetotaltimeof thesurvey,thedepthofthesurvey(magnitudelimit)andthe intrinsicefficiencyofagalaxyinproducingsupernovae – The intrinsic variance in supernovae apparent magnitude, thisistypicallyσ ∼0.15. m – The uncertainty δ in the measured apparent magnitude of m agivensupernovae,thisvaluewilldependontheparticular instrumentthatisusedintheobservations.Foraspace-based instrumentδ ∼0.02andforaground-basedinstrumentthe m uncertaintymaybeδ ∼0.05. m – The minimumandmaximumredshiftsfor the numberden- sity ofsupernovae.Note thatforsimplicity we will assume that the number of supernovae in each redshift bin is con- stantinredshift.Tocalculatethenumberofredshiftbinswe set the shotnoise uncertaintyonthe apparentmagnitudein a givenbintobe1/1000theintrinsicmagnitudedispersion asistypicallyassumedTegmarketal.(1998)andHuterer& Turner(2001). BAO: – Theareaofthesurveyinsquaredegrees – The number of redshift bins in which to measure the BAO scale.Notethatthebinboundarieswillbechosensuchthat thenumberofgalaxiesineachbinisapproximatelyconstant – The median redshift for the number density distribution of galaxies.WeemploythecommonlyusedSmailetal.(1994) formula Fig.A.2.Theoutlineofthewebsiteintheformofaflowdiagram A.4.Surveys highlightingthe inter-relationsbetweenthe optionalinputsand the resultant outputs. A diamond represents a logical ‘for’ i.e. BoththeobservablesandtheFishermatrixparametererrorpre- foroptionAdothisorforoptionBdothat.Atrianglerepresents dictionsdependon the designof the experiment.The user will alogical‘if’i.e.ifCischosenthendothis. findonStep2thatforeachlensingobservableandFishermatrix requiredwehaveprovidedthechoiceofeitheracustomsurvey oracurrent/futuresurvey.Thereferencesforthesurveysshown are: – DarkEnergySurvey(DES):DESCollab(2005) – DarkUNiverseExplorer(DUNE):Refregieretal.(2008b) – Large Synoptic Survey Telescope (LSST): Tyson et al. (2006),Ivezicetal.(2008) – Panoramic Survey Telescope & Rapid Response System (Pan-STARRS1):Kasieretal.(2004) – SuperNovae Acceleration Probe (SNAP) : SNAP Collab (2005),Hutereretal.(2005) The suite of surveys available will continually be updated and [email protected] Fig.A.3.Thefirststepinthestepwiseprocessofspecifyingthe A.5.MultipleCosmologies inputstothecalculation. InStep1theusercanchoosebetweenoneortwocosmologies. Thisfeatureistoenablethesensitivityofcosmologicalfunctions and observablesto certain cosmologicalparameters(or combi- AfterthelastStep(eitherStep2orStep3dependingonthe nation or parameters) to be investigated.By selecting two cos- productsandlevelofcustomisationneeded)theuseristakento mologiesfromthedropdownbuttononStep1theusercanfill a waitingpagewhilst thecalculationsare performed.Note that in the values of each cosmological parameter. On the interac- there are certain ‘illegal’ values of the cosmology parameters tive pages the user will then see two lines, one for each cos- andcustomisablevariablessuch asΩ < 0 or k > k that m min max mology,aboveeitherthecosmologicalfunctionsorobservables the iCosmo source code will not accept. If an illegal value is beingplotted. passedtotheinteractivecalculatorthewaitingpagewilldisplay 10 T.D.Kitching,A.Amara,A.Rassat,A.Refregier:CloudCosmology:BuildingtheWebInterfaceforiCosmo Product(s) Options Distances,HubbleParameter,GrowthFactor z ,z min max MatterPowerSpectrum k ,k min max Linear:Eisenstien&Hu(1997)(withorwithoutbaryonoscillations) orBardeenetal.(1986) Non-Linear:Peacock&Dodds(1996)orSmithetal.(2003) LensingPowerSpectrumorLensingFisherMatrix ℓ ,ℓ ,Survey min max BAODistanceMeasureorBAOFisherMatrix Survey SupernovaeMagnitude-DistanceorSupernovaeFisherMatrix Survey TableA.2.TheoptionsgiveninStep2relevantforeachoftheproductschoseninStep1. amessagedetailingthevaluesthatarediscrepantanddisplaya buttonwithwhichtheusercanreturntothepreviousstep.After thecalculationstheuserwillberedirectedtotheInteractivere- sultspagesdescribedinthenextSectionA.6. A.6.InteractivePages InthisSectionwewilldescribetheInteractiveresultswebpages. When the user arrives at the interactive results page they will be presented with a number of tabs one can change between anyofthe tabssimplybyclickingontherelevantheaders.The CosmologyFunctionstabwillalwaysbepresent,sincetheseare always calculated, in addition there may also be a Cosmology ObservablesandaCosmologyErrorstab.Theusercanclickon anytabandchangebetweentabsinanyorderorcombination.In additionthenavigationbaratthetopofthepageallowstheuser tolinktootheriCosmopages. The options that are given on each tab are shown in Table Fig.A.4. The Interactiveresults tabs in iCosmoweb site. Here A.3,wherean“&”meansthateachoptioncanbeshownsimul- weshowtheCosmologyFunctionstab,inthisexamplewehave taneouslyandan“OR”meansthattheoptionsaremutuallyex- chosentwocosmologiesandthedistancesbuttonisshown. clusive. The results tabs are all arranged using a common template whichbeseeninFigureA.4. Thistemplateissplitintoa num- Below the plot, in each tab, is a “Download Text Output” berofregions.Thetopregionisdedicatedtotheinputcosmol- link. By clicking on this link the user can download the data ogyused,thesurveyparameters(inthe case oftheCosmology plottedatthepresenttimeinanasciitableformatforlateruse. Observables and Errors tabs) and the options available for the Theformatoftheasciifileisshowntotherightofthelinkand particulartab. isupdatedsothatitisalwaysrelevanttotheparticularfunction Associatedwitheachcosmologicalparameterisa boxcon- beingplotted. tainingthecurrentfiducialvalue.Tochangethefiducialvaluethe To the right of the plot in each tab are the options that are usercansimplyenteranalternativevalueandclickon“Change relevanttotheparticularproductsthatarebeingplotted,wewill Cosmology”.Theuserwillthenberedirectedtocalculationpage nowexplaineachtabinturn. wherethecosmologicalproductswillbere-calculatedusingthe newcosmology. A.6.1. CosmologyFunctionsTab Thecentralpartofeachtab isthegraphicalwindow.When anyoftheoptionsinatabarechangedtheplotwillbeautomat- The cosmology functions tab presents the calculations of ically updated.The plotis providedon screen in gif format,to the basic cosmology functions, and will always be present savetheplotasagifmostbrowsersprovideasaveoptionwhen in the interactive section. To change between the functions an image is right-clicked.In additionto the gif formatwe pro- the user can click on the relevant button. When the button is videanencapsulatedpostscriptversionofeveryplot,thiscanbe changedthe“CosmologyOptions”ontherighthandsideofthe downloadedbyclickingontheplot. graphwillchangetoreflectthenewoptionsavailabletotheuser. In every tab, to the left of the plot, there are the graphical optionsthesegivetheusertheabilitytocontrolthexandy-axis Distances When the distances button is selected the angular ranges of the plot using the “Re-Scale” button. By default the diameter, luminosity, comoving and light travel distances can autoscalebuttonisselected.Whenautoscaleisselectedtheplot be plotted. Any combination of these distances can be plotted willbeautomaticallyscaledsuchthatthefunctionplottedwillfit byselectingtherelevantcheckboxes–coloursforeachfunction withintheviewport.Werecommendthattheautoscalefunction can also be chosen independently using the drop down menu. isenabledin mostsituations.Inadditiontorescalingthegraph Thesefunctionscanbeplottedasafunctionof:redshiftz,scale thetypeofaxiscanalsobechanged–fromlineartologarithmic factor1/(1+z)orlook-backtime. (base10)orviceversa–byclickingontherelevantbuttons.