connect( DB_SERVER . ':' . DB_PORT, DB_USERNAME, DB_PASS, DB_NAME ); //$link = db_connect_admin(); //loadNewTables(); ////////////////////////////// // Initialise error messages // $date_error = ""; /////////////////////////////////// // Find out the first and last dates //$query = "select min(mjd), max(mjd) from ".OBSERVATIONS_TABLE; $min_mjd = ''; $max_mjd = ''; $db->GetMinMaxMJD( $min_mjd, $max_mjd ); // Convert from MJD to JD $min_jd = $min_mjd + 2400000.5; $max_jd = $max_mjd + 2400000.5; // convert the mjd to a date $min_jd = floor($min_jd); $max_jd = ceil($max_jd); $min_unix = jdtounix($min_jd); $max_unix = jdtounix($max_jd); $min_date_text = date("j F Y", $min_unix); $max_date_text = date("j F Y", $max_unix); $minDay = date("j",$min_unix); $minMonth = date("n",$min_unix); $minYear = date("Y",$min_unix); $maxDay = date("j",$max_unix); $maxMonth = date("n",$max_unix); $maxYear = date("Y",$max_unix); // proprietry date limit $today_mjd = cal_to_jd ( CAL_GREGORIAN, date("n"), date("j"), date("Y") ) - 2400000.5; $prop_mjd = $today_mjd - PROPRIETRY_PERIOD_DAY; $prop_unix = jdtounix($prop_mjd+2400000.5); $prop_date_text = date("j F Y", $prop_unix); // Clear any old form inputs in session cache init(); ////////////////////////////////////////////// // Get the field names to fill form checkboxes $fields = $db->GetObservationFields(); $field_names = Array("filename" => "Filename", "src_name" => "Source Name", "project_id" => "Project ID", "raj" => "RA (J2000, hh:mm:ss)", "decj" => "Dec (J2000, dd:mm:ss)", "data_type" => "Data Type", "obsfreq" => "Frequency", "bw" => "Bandwidth", "scanlen" => "Scan Length", "date" => "UT Date", "ut" => "UT Time", "MJD" => "MJD", "rajd" => "RA (J2000, degs)", "decjd" => "Dec (J2000, degs)", "gl" => "Gal. Long. (degs)", "gb" => "Gal. Lat. (degs)", "BMAJ" => "Beamsize: BMAJ", "BMIN" => "Beamsize: BMIN", "BPA" => "Beam: BPA", "dm" => "D.M.", "period" => "Period", "nchan" => "# channels", "npol" => "# polarisations", "nbin" => "# bins", "nsub" => "# subintegrations", "tsamp" => "Sample time", "nbits" => "# bits per sample", "nbeam" => "# beams", "cnfg" => "Configuration", "inst" => "Instrument", "rcvr" => "Receiver", "hdrver" => "PSRFITS version", "survey" => "Survey name", "telescope" => "Telescope", "site" => "Site ID", "obsrvr" => "Observer ID" ); ///////////////////////////////////////////////// // Load search form parameters if they have been stored. // /////////////////////////////////////////////// // Get the data types available in the database // $data_types = $db->GetDataTypes(); /////////////////////////////////////////////// // If the user clicked on the logout button if (isset($HTTP_GET_VARS['command'])) { $command = $HTTP_GET_VARS['command']; if ($command == 'logout') { //unset($_SESSION['auth_code']); //unset($_SESSION['username']); $_SESSION = array(); } } // If the user hasn't logged in before or if the previous // session's authentication wasn't successful // Then use the submitted username and password if (!isset($_SESSION['auth_code']) || $_SESSION['auth_code'] != OK) { // $username = $HTTP_POST_VARS["username"]; // $password = $HTTP_POST_VARS["password"]; $username = $HTTP_POST_VARS["opalEmail"]; $password = $HTTP_POST_VARS["opalPassword"]; $type = $HTTP_POST_VARS['authenticateType']; if($type == "anon"){ $username = $HTTP_POST_VARS["email"]; $auth_code = OK; logger_login( $username, 'Anonymous', 'success' ); } else{ $auth_code = authenticate($username, $password); if( $auth_code == OK ) logger_login( $username, 'Opal', 'success' ); else logger_login( $username, 'Opal', 'failure' ); //$auth_code = newAuthenticate(); } } else { $auth_code = $_SESSION['auth_code']; $username = $_SESSION['username']; } // Initial state where no username or password supplied OR bad login state if ($auth_code != OK) { ?>
The ATNF Pulsar Data Archive provides access to pulsar observations made with the Parkes radio Telescope. Data older than months is publicly available, and can be accessed by simply providing your email address. More recent data is proprietry, and can only be accessed by those who were involved in the proposal. We plan to do this via the OPAL system, but this is currently not enabled. In the interim, those who have previously obtained a login for the Data Archive can use that option below (making sure to check the "Data Archive login" button!).
A Users Guide to the archive is available.
18 months old"; } ?>This archive provides access to pulsar observations taken at the Parkes radio telescope between the dates of and ".$max_date_text?>.
Note that you do not have access to data more recent than ".$prop_date_text.".\n"; // // // }?>See the Users Guide link for more details.
Logout | Instructions | Users Guide |
'; } ?>