Index: /tags/ipp-ops-20220906/tools/skycoverage/README
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/README	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/README	(revision 42924)
@@ -0,0 +1,26 @@
+
+This directory contains the scripts which generate the sky coverage maps:
+
+coverage.mana.sh -- mana script which performs the database queries and generates the plots
+coverage.sh      -- /bin/sh wrapper providing the environment variables needed by mana
+coverage.cron    -- crontab script to run the above
+coverage.css	 -- copy of the css used by the website
+index.html       -- copy of the top-level web page
+coverage.log	 -- output from coverage.mana.sh goes here (as of 2025.09.25, this does not rotate)
+
+The script 'coverage.mana.sh' does the real work.  Output products are
+sent to the directory defined at the top of the script:
+
+$LOCALDIR = /data/ipp175.0/ipp/skycoverage
+
+After the updated plots are generated, the script runs rsync to copy
+them to the externally-visible website on ippops4 (see the variable 
+'TARGET' in that script).
+
+The ipp user has a special ssh key defined for ippops4, and
+.ssh/config specifies that key is used to connect with ippops4.  Note
+that if the target host is changed (even to 'ippops4.ifa.hawaii.edu'),
+the specified key will not be used, so be careful!
+
+
+
Index: /tags/ipp-ops-20220906/tools/skycoverage/coverage.cron
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/coverage.cron	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/coverage.cron	(revision 42924)
@@ -0,0 +1,2 @@
+# crontab file for skycoverage maps
+0 8 * * * /home/panstarrs/ipp/skycoverage/coverage.sh >> /home/panstarrs/ipp/skycoverage/coverage.log 2>&1
Index: /tags/ipp-ops-20220906/tools/skycoverage/coverage.css
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/coverage.css	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/coverage.css	(revision 42924)
@@ -0,0 +1,71 @@
+/* internal link line: c0d0d0 : d8d0f0
+   external link line: 303070 
+   border:             0080c0
+ */
+
+body  { 
+    background-color: #a0d0e0; 
+    padding: 5px; 
+    margin: 5px
+}
+
+a:link, a:visited, a:active { 
+    text-decoration: underline; 
+    font-weight: bold; 
+    color: #ff0000
+}
+
+a.button      { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #000000; 
+    background: #0080c0
+}
+table.pics    { 
+    text-align: left; 
+    background: #0080c0; 
+    font-size: small; 
+    color: #ffffff; 
+    padding: 2px; 
+}
+table.stats   { 
+    text-align: left; 
+    background: #ffffff; 
+    font-size: big; 
+    color: #000000; 
+    padding: 10px; 
+}
+table.index   { 
+    border: 3px solid #0080c0; 
+    text-align: left; 
+    background: #ffffff; 
+    font-size: big; 
+    color: #000000; 
+    padding: 10px; 
+}
+td.index  { 
+           text-align: right; 
+           font-size: normal;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 3px solid #0080c0; 
+	   padding: 5px; 
+}
+tr.index  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 3px solid #0080c0; 
+	   padding: 5px; 
+}
+td.label  { 
+           font-size: large;  
+           font-weight: bold;  
+	   padding: 5px; 
+	   transform: rotate(90deg);
+}
Index: /tags/ipp-ops-20220906/tools/skycoverage/coverage.mana.sh
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/coverage.mana.sh	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/coverage.mana.sh	(revision 42924)
@@ -0,0 +1,472 @@
+#!/usr/bin/env mana
+
+$DEG_RAD = 180.0 / $M_PI
+$TARGET = ippops4:/export/ippops4.0/www/localhost/htdocs/ippdata/skycoverage.20201110
+$LOCALDIR = /data/ipp175.0/ipp/skycoverage
+
+$cameras = gpc1 gpc2
+$filters = g r i z y w
+
+$SAVE_OUTPUT = 1
+$KAPA = kapa -noX -nan 0xffff 0xffff 0xffff
+$STYLE = dark
+
+if (0)
+  # test mode
+  $cameras = gpc1 
+  $filters = g
+  $SAVE_OUTPUT = 0
+  $KAPA = kapa -nan 0xffff 0xffff 0xffff
+  # $STYLE = light
+end
+
+$color_cgrid:light = black
+$color_cgrid:dark = white
+
+$color_dr1:light = grey30
+$color_dr1:dark = grey70
+
+$color_label:light = black
+$color_label:dark = white
+
+# used by dbextract.data
+$surveys = 
+$surveys = $surveys '3PI',        
+$surveys = $surveys 'BRIGHT',     
+$surveys = $surveys 'CAL',        
+$surveys = $surveys 'CFA',        
+$surveys = $surveys 'CNP',        
+$surveys = $surveys 'ESS',        
+$surveys = $surveys 'Footprint',  
+$surveys = $surveys 'FSS',        
+$surveys = $surveys 'K2',         
+$surveys = $surveys 'LIGO',       
+$surveys = $surveys 'M31',        
+$surveys = $surveys 'MD',         
+$surveys = $surveys 'MSS',        
+$surveys = $surveys 'NCU',        
+$surveys = $surveys 'OSS',        
+$surveys = $surveys 'PI',         
+$surveys = $surveys 'PR201108',   
+$surveys = $surveys 'QUB',        
+$surveys = $surveys 'SAS2',       
+$surveys = $surveys 'SNIa',       
+$surveys = $surveys 'SS',         
+$surveys = $surveys 'STD',        
+$surveys = $surveys 'STS',        
+$surveys = $surveys 'STS2A',      
+$surveys = $surveys 'STS2B'
+
+$have_mask_east = 0
+$have_mask_west = 0
+$have_mask_pole = 0
+
+# stages:
+# extract data (camera, filter)
+# define 3 kapa windows
+# make density buffers (use 3 output devices)
+# generate pretty plots for (gpc1), (gpc2), (gpc1+2)
+
+macro dbextract.data
+  if ($0 != 3)
+    echo "USAGE: dbextract.data (filter) (camera)"
+    break
+  end
+
+  local filt camera
+  $filt = $1
+  $camera = $2
+
+  if ("$filt" == "init")
+    dbconnect scidbm ipp $camera -p ipp 
+    return
+  end
+
+  if ("$camera" == "gpc1")
+    dbselect ra, decl, exp_time from rawExp where exp_type = 'OBJECT' and obs_mode in ($surveys) and filter = '$filt.00000'
+  end
+  if ("$camera" == "gpc2")
+    dbselect ra, decl, exp_time from rawExp where exp_type = 'OBJECT' and obs_mode in ($surveys) and filter = '$filt.00002'
+  end
+  set R = ra * $DEG_RAD
+  set D = decl * $DEG_RAD
+  set exp_time = isnan(exp_time)  ? zero(exp_time) : exp_time
+  set exp_time = (exp_time < 0.0) ? zero(exp_time) : exp_time
+
+  set R.$camera.$filt = R
+  set D.$camera.$filt = D
+  set T.$camera.$filt = exp_time
+end
+
+macro make.kapa.window
+  if ($0 != 2)
+    echo "USAGE: make.kapa.window (side)"
+    break
+  end
+
+  local side
+  $side = $1
+
+  device -n $side
+
+  # fraction of window used for colorbar
+  $dcby = 0.1
+
+  clear -s
+  section default 0 $dcby 1 {1 - $dcby}
+  section default -imtool none; parity 0 1; tvcolor rainbow; label -fn helvetica 24
+
+  if ("$side" == "east")
+    $label:$side = 0^h|
+    resize 1800 1000; 
+    region 0.0 0 85 ait -no-clear
+  end
+  if ("$side" == "west")
+    $label:$side = 12^h|
+    resize 1800 1000; 
+    region 180.0 0 85 ait -no-clear
+  end
+  if ("$side" == "pole")
+    $label:$side = North Pole
+    resize 950 950
+    region 0 89.99 60 zea -no-clear
+  end
+
+  box -ticks 0000 -labels 0000; 
+  if ("$side" == "east") 
+    cgrid -ra-by-hour -c $color_cgrid:$STYLE -label-color $color_label:$STYLE -labels -label-ra 90 -label-dec -40
+  end
+  if ("$side" == "west") 
+    cgrid -ra-by-hour -c $color_cgrid:$STYLE -label-color $color_label:$STYLE -labels -label-ra  90 -label-dec -40
+  end
+  if ("$side" == "pole") 
+    cgrid -ra-by-hour -c $color_cgrid:$STYLE
+  end
+
+  # add this label later:
+  # label +x "filter: $filt, center: $centerLabel : $datestamp"
+  euclid.regions
+
+  section colorbar 0 0 1 $dcby
+  section colorbar -imtool none
+
+  box -lw 2 -ticks 1000 -labels 1000 +xpad 0.0 -tickpad 0.1 -xpad 3.0 -labelpadx 2.5 -ypad 5.5 +ypad 5.5
+  label -x "Exposure Time (sec)"
+end
+
+macro make.density.map
+  if ($0 != 4)
+    echo "USAGE: make.density.map (side) (filter) (camera)"
+    break
+  end
+
+  local side filt camera
+  $side = $1
+  $filt = $2
+  $camera = $3
+
+  device -n $side
+  section default
+
+  cdensify im.$side.$camera.$filt R.$camera.$filt D.$camera.$filt -psf circle -scale 1.6 -raw -value T.$camera.$filt
+  keyword  im.$side.$camera.$filt DATE -w "$datestamp"
+  keyword  im.$side.$camera.$filt FILTER -w "$filt"
+
+  if (not($have_mask_$side)) 
+    getcoords im.$side.$camera.$filt tmp_ra tmp_dec
+    set mask_$side = tmp_ra * 0 + 1
+    $have_mask_$side = 1
+  end
+
+  set im.$side.$camera.$filt = im.$side.$camera.$filt * mask_$side
+end
+
+macro make.density.png
+  if ($0 != 4)
+    echo "USAGE: make.density.map (side) (filter) (camera)"
+    break
+  end
+
+  local side filt camera
+  $side = $1
+  $filt = $2
+  $camera = $3
+
+  device -n $side
+
+  section default
+  tv.imhist im.$side.$camera.$filt 0.02 0.99; # sets the values vrange and vzero
+
+  label +x "filter: $filt, center: $label:$side : $datestamp"
+
+  section colorbar
+
+  # vrange and vzero below are set by tv.imhist
+  mcreate colorbar 1600 100
+  set colorbar = $vrange*(xramp(colorbar) / colorbar[][0]) + $vzero
+  tv colorbar $vzero $vrange
+  center {colorbar[][0]/2} {colorbar[0][]/2} 1
+  lim $vzero {$vzero + $vrange} 0 1 
+
+  if ($SAVE_OUTPUT)
+    png -name $LOCALDIR/$camera/$filt/$filt.$camera.$side.png
+#   keyword im.$side.$camera.$filt RADECSYS -w IRCS
+    keyword im.$side.$camera.$filt RADECSYS -w ICRS
+    wd im.$side.$camera.$filt $LOCALDIR/$camera/$filt/$filt.$camera.$side.fits -bitpix -32 -bzero 0 -bscale 1.0
+  end
+end
+
+macro tv.imhist
+  if ($0 != 4)
+    echo "USAGE: tv.imhist (buffer) (tmin) (tmax)"
+    break
+  end
+
+  local tvbuff tmin tmax
+  $tvbuff = $1
+  $tmin = $2
+  $tmax = $3
+
+  # display from 10% to 90% (assuming min value is saturated)
+  set tmp_buff = $tvbuff
+  clip tmp_buff 0 0 5e9 5e9 -nan 0
+  imhist tmp_buff t Nt -delta 10
+  Nt[0] = 0
+  cumulative Nt St
+  set Ft = St / St[-1]
+  threshold -q t Ft $tmin
+  $vzero = $threshold
+
+  threshold -q t Ft $tmax
+  $vrange = $threshold - $vzero
+
+  tv $tvbuff $vzero $vrange
+end
+
+macro euclid.regions
+
+  # north cap : five line segments:
+  # (R,D) : -72, 0 to -41, 0
+  # -41,0 to 54.0,37.5  (along ecliptic)
+  # 54.0, 37.5 to 10.8, 78.6 (along galactic)
+  # 10.8, 78.6 t
+
+ $RCOLOR = -c $color_cgrid:$STYLE
+
+ # northern cap:
+ if (1)
+   ## # celestial: DEC = 0, 206.2 - 254
+   ## create x 206.2 254 0.1
+   ## set y = zero(x)
+   ## cplot -pt 0 -sz 0.4 $RCOLOR x y
+   
+   # celestial: DEC = +15, 183.2 - 262
+   create x 183.2 262 0.1
+   set y = zero(x) + 15
+   cplot -pt 0 -sz 0.4 $RCOLOR x y
+   
+   # celestial: DEC = +30, 123.2 - 268
+   create x 123.2 268 0.1
+   set y = zero(x) + 30
+   cplot -pt 0 -sz 0.4 $RCOLOR x y
+   
+   # ecliptic: Beta = 10, Lambda = 113.2 - 119.5
+   create x 113.2 119.5 0.1
+   set y = zero(x) + 10
+   csystem E C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # ecliptic: Beta = 15, Lambda = 136.9 - 176.8
+   create x 136.9 176.8 0.1
+   set y = zero(x) + 15
+   csystem E C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # galactic : b = 25, l = 127.9 - 189.3
+   create x 127.9 189.3 0.1
+   set y = zero(x) + 25
+   csystem G C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # celestial: DEC = 85, 77 - 314.5
+   create x 77 314.5 0.1
+   set y = zero(x) + 85
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # galactic : b = 25, l = 37.6 - 118.3
+   create x 37.6 118.3 0.1
+   set y = zero(x) + 25
+   csystem G C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+ end
+
+ # southern cap:
+ if (1)
+
+   # celestial: DEC = 0, 311.1 - 333.8
+   create x 311.1 333.8 0.1
+   set y = zero(x) + 0
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # celestial: DEC = +30, 340.5 - 44.8
+   create x -19.5 44.8 0.1
+   set y = zero(x) + 30
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+   
+   # ecliptic: Beta = 10, 335.4 - 53.2
+   create x -24.6 53.2 0.1
+   set y = zero(x) + 10
+   csystem E C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+
+   # galactic: l = -25, b = 46.5 - 157.1
+   create x 46.5 157.1 0.1
+   set y = zero(x) - 25
+   csystem G C x y
+   cplot -pt 0 -sz 0.4 $RCOLOR x y 
+ end
+
+ if (0)
+  # euclid boundaries
+  create x 0 360 0.1
+  set y = zero(x) + 85
+  cplot -pt 0 -sz 0.4 -c green x y
+  set y = zero(x)
+  cplot -pt 0 -sz 0.4 -c green x y
+
+  set lx = x
+  set bx = zero(lx) + 25
+  csystem G C lx bx
+  cplot -pt 0 -sz 0.4 -c blue80 lx bx
+
+  set lx = x
+  set bx = zero(lx) - 25
+  csystem G C lx bx
+  cplot -pt 0 -sz 0.4 -c blue80 lx bx
+
+  set el = x
+  set eb = zero(el) - 15
+  csystem E C el eb
+  cplot -pt 0 -sz 0.4 $RCOLOR el eb
+
+  set el = x
+  set eb = zero(el) + 15
+  csystem E C el eb
+  cplot -pt 0 -sz 0.4 $RCOLOR el eb
+ end
+
+ $RCOLOR = -c $color_dr1:$STYLE
+ DR1.boundary
+end
+
+macro DR1.boundary 
+ if (1) 
+  if (0)
+    data EuclidDR1_polygon.csv
+    read -skip 1 -csv Re 1 De 2
+    cplot -pt 0 -sz 0.5 -c green Re De
+  end
+
+  # north boundary: 
+  # corner 105, 80 -> 94.7, 56.9 in ecliptic
+  create Rn 105.2 285 0.1
+  set Dn = zero(Rn) + 80
+  cplot $RCOLOR -pt box -sz 0.4 Rn Dn
+
+  # west boundary
+  create elat 50 56.9 0.1
+  set elon = zero(elat) + 95
+  csystem E C elon elat
+  cplot $RCOLOR -pt box -sz 0.4 elon elat
+
+  # south boundary west
+  create elon 95 150 0.1
+  set elat = zero(elon) + 50
+  csystem E C elon elat
+  cplot $RCOLOR -pt box -sz 0.4 elon elat
+ 
+  # south boundary east
+  create elat 50 80 0.1
+  set elon = zero(elat) + 150
+  csystem E C elon elat
+  cplot $RCOLOR -pt box -sz 0.4 elon elat
+
+  # NEP circle
+  create elon3 150 296 0.1
+  set elat3 = zero(elon3) + 80
+  csystem E C elon3 elat3
+  cplot $RCOLOR elon3 elat3 -pt box -sz 0.4
+
+  # galactic plane boundary east
+  create glon 86.5 103 0.1
+  set glat = zero(glon) + 25
+  csystem G C glon glat
+  cplot $RCOLOR -pt box -sz 0.4 glon glat
+
+  # east boundary
+  create Dn 72 80 0.1
+  set Rn = zero(Dn) + 285
+  csystem E C elon elat
+  cplot $RCOLOR -pt box -sz 0.4 Rn Dn
+
+  # DR2 south boundary
+  create elon 100.3 189.5 0.1
+  set elat = zero(elon) + 37
+  csystem E C elon elat
+  cplot $RCOLOR -pt box -sz 0.4 elon elat
+ end
+end
+
+macro get.3pi.data
+  $d = `date +%Y%m%d`
+  $subdir = `date +%Y%m`
+  mkdir $LOCALDIR/archive/$subdir/sky.$d
+
+  date -var datestamp
+
+  # extract all of the data from the database:
+  foreach camera $cameras
+    dbextract.data init $camera
+    foreach filter $filters
+      dbextract.data $filter $camera
+    end
+  end
+
+  foreach side east west pole
+    make.kapa.window $side
+  end  
+
+  list camlist -split $cameras
+  $Ncameras = $camlist:n
+  $pngcameras = $cameras
+  if ($Ncameras > 1) 
+    $pngcameras = $cameras both
+  end
+
+  foreach side east west pole
+    foreach filter $filters
+      foreach camera $cameras
+        make.density.map $side $filter $camera
+      end
+      if ($Ncameras > 1) 
+        set im.$side.both.$filter = im.$side.gpc1.$filter + im.$side.gpc2.$filter
+      endif
+      foreach camera $pngcameras
+        make.density.png $side $filter $camera
+        if ($SAVE_OUTPUT)
+          exec /bin/cp -f $LOCALDIR/$camera/$filter/$filter.$camera.$side.png $LOCALDIR/archive/$subdir/sky.$d/
+        end
+      end
+    end
+  end
+
+  if ($SAVE_OUTPUT) 
+    # note: ssh to target
+    exec rsync --exclude=trash --exclude=coverage.mana.sh --exclude=coverage.sh --exclude=coverage.log -auv $LOCALDIR/ $TARGET/
+  end
+end
+
+if ($SCRIPT) 
+  get.3pi.data
+  exit 0
+end
Index: /tags/ipp-ops-20220906/tools/skycoverage/coverage.sh
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/coverage.sh	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/coverage.sh	(revision 42924)
@@ -0,0 +1,13 @@
+#!/bin/csh -f
+
+# this script needs to set up the paths so it can run under crontab 
+
+set psconfig = /home/panstarrs/ipp/psconfig/ipp-20220906-ubuntu.lin64
+
+setenv PATH $psconfig/bin:.:/usr/local/bin:/usr/ucb:/bin:/usr/bin
+setenv    LIBRARY_PATH $psconfig/lib:$psconfig/lib/mysql:/usr/local/lib:/usr/lib:/usr/X11R6/lib:/usr/lib64:/usr/X11R6/lib64:
+setenv LD_LIBRARY_PATH $LIBRARY_PATH
+
+# setenv LD_LIBRARY_PATH $psconfig/lib:$psconfig/lib/mysql:/usr/local/lib:/usr/lib:/usr/X11R6/lib:/usr/lib64:/usr/X11R6/lib64:
+
+/home/panstarrs/ipp/skycoverage/coverage.mana.sh
Index: /tags/ipp-ops-20220906/tools/skycoverage/index.html
===================================================================
--- /tags/ipp-ops-20220906/tools/skycoverage/index.html	(revision 42924)
+++ /tags/ipp-ops-20220906/tools/skycoverage/index.html	(revision 42924)
@@ -0,0 +1,167 @@
+<html><head><title> Pan-STARRS Sky Coverage </title></head>
+<link rel=STYLESHEET HREF="coverage.css">
+
+  Here are the most recent sky coverage plots from PS1, PS2, and both 
+  telescopes combined.  For older images, <a href="archive">see the archive. </a><br>
+
+  <body>
+    <table>
+      <tr><th style="font-size:200%;" colspan=6>Both Telescopes</th></tr>
+      <tr><th>g</th><th>r</th><th>i</th><th>z</th><th>y</th><th>w</th></tr>
+      <tr>
+	<td><a href="both/g/g.both.west.png" target="_blank"><img width=200 src="both/g/g.both.west.png"></a></td>
+	<td><a href="both/r/r.both.west.png" target="_blank"><img width=200 src="both/r/r.both.west.png"></a></td>
+	<td><a href="both/i/i.both.west.png" target="_blank"><img width=200 src="both/i/i.both.west.png"></a></td>
+	<td><a href="both/z/z.both.west.png" target="_blank"><img width=200 src="both/z/z.both.west.png"></a></td>
+	<td><a href="both/y/y.both.west.png" target="_blank"><img width=200 src="both/y/y.both.west.png"></a></td>
+	<td><a href="both/w/w.both.west.png" target="_blank"><img width=200 src="both/w/w.both.west.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="both/g/g.both.west.fits" download> FITS </a></td>
+	<td><a href="both/r/r.both.west.fits" download> FITS </a></td>
+	<td><a href="both/i/i.both.west.fits" download> FITS </a></td>
+	<td><a href="both/z/z.both.west.fits" download> FITS </a></td>
+	<td><a href="both/y/y.both.west.fits" download> FITS </a></td>
+	<td><a href="both/w/w.both.west.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="both/g/g.both.east.png" target="_blank"><img width=200 src="both/g/g.both.east.png"></a></td>
+	<td><a href="both/r/r.both.east.png" target="_blank"><img width=200 src="both/r/r.both.east.png"></a></td>
+	<td><a href="both/i/i.both.east.png" target="_blank"><img width=200 src="both/i/i.both.east.png"></a></td>
+	<td><a href="both/z/z.both.east.png" target="_blank"><img width=200 src="both/z/z.both.east.png"></a></td>
+	<td><a href="both/y/y.both.east.png" target="_blank"><img width=200 src="both/y/y.both.east.png"></a></td>
+	<td><a href="both/w/w.both.east.png" target="_blank"><img width=200 src="both/w/w.both.east.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="both/g/g.both.east.fits" download> FITS </a></td>
+	<td><a href="both/r/r.both.east.fits" download> FITS </a></td>
+	<td><a href="both/i/i.both.east.fits" download> FITS </a></td>
+	<td><a href="both/z/z.both.east.fits" download> FITS </a></td>
+	<td><a href="both/y/y.both.east.fits" download> FITS </a></td>
+	<td><a href="both/w/w.both.east.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="both/g/g.both.pole.png" target="_blank"><img width=200 src="both/g/g.both.pole.png"></a></td>
+	<td><a href="both/r/r.both.pole.png" target="_blank"><img width=200 src="both/r/r.both.pole.png"></a></td>
+	<td><a href="both/i/i.both.pole.png" target="_blank"><img width=200 src="both/i/i.both.pole.png"></a></td>
+	<td><a href="both/z/z.both.pole.png" target="_blank"><img width=200 src="both/z/z.both.pole.png"></a></td>
+	<td><a href="both/y/y.both.pole.png" target="_blank"><img width=200 src="both/y/y.both.pole.png"></a></td>
+	<td><a href="both/w/w.both.pole.png" target="_blank"><img width=200 src="both/w/w.both.pole.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="both/g/g.both.pole.fits" download> FITS </a></td>
+	<td><a href="both/r/r.both.pole.fits" download> FITS </a></td>
+	<td><a href="both/i/i.both.pole.fits" download> FITS </a></td>
+	<td><a href="both/z/z.both.pole.fits" download> FITS </a></td>
+	<td><a href="both/y/y.both.pole.fits" download> FITS </a></td>
+	<td><a href="both/w/w.both.pole.fits" download> FITS </a></td>
+      </tr>
+    </table><br><br>
+    <table>
+      <tr><th style="font-size:200%;" colspan=6>PS1</th></tr>
+      <tr><th>g</th><th>r</th><th>i</th><th>z</th><th>y</th><th>w</th></tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.west.png" target="_blank"><img width=200 src="gpc1/g/g.gpc1.west.png"></a></td>
+	<td><a href="gpc1/r/r.gpc1.west.png" target="_blank"><img width=200 src="gpc1/r/r.gpc1.west.png"></a></td>
+	<td><a href="gpc1/i/i.gpc1.west.png" target="_blank"><img width=200 src="gpc1/i/i.gpc1.west.png"></a></td>
+	<td><a href="gpc1/z/z.gpc1.west.png" target="_blank"><img width=200 src="gpc1/z/z.gpc1.west.png"></a></td>
+	<td><a href="gpc1/y/y.gpc1.west.png" target="_blank"><img width=200 src="gpc1/y/y.gpc1.west.png"></a></td>
+	<td><a href="gpc1/w/w.gpc1.west.png" target="_blank"><img width=200 src="gpc1/w/w.gpc1.west.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.west.fits" download> FITS </a></td>
+	<td><a href="gpc1/r/r.gpc1.west.fits" download> FITS </a></td>
+	<td><a href="gpc1/i/i.gpc1.west.fits" download> FITS </a></td>
+	<td><a href="gpc1/z/z.gpc1.west.fits" download> FITS </a></td>
+	<td><a href="gpc1/y/y.gpc1.west.fits" download> FITS </a></td>
+	<td><a href="gpc1/w/w.gpc1.west.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.east.png" target="_blank"><img width=200 src="gpc1/g/g.gpc1.east.png"></a></td>
+	<td><a href="gpc1/r/r.gpc1.east.png" target="_blank"><img width=200 src="gpc1/r/r.gpc1.east.png"></a></td>
+	<td><a href="gpc1/i/i.gpc1.east.png" target="_blank"><img width=200 src="gpc1/i/i.gpc1.east.png"></a></td>
+	<td><a href="gpc1/z/z.gpc1.east.png" target="_blank"><img width=200 src="gpc1/z/z.gpc1.east.png"></a></td>
+	<td><a href="gpc1/y/y.gpc1.east.png" target="_blank"><img width=200 src="gpc1/y/y.gpc1.east.png"></a></td>
+	<td><a href="gpc1/w/w.gpc1.east.png" target="_blank"><img width=200 src="gpc1/w/w.gpc1.east.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.east.fits" download> FITS </a></td>
+	<td><a href="gpc1/r/r.gpc1.east.fits" download> FITS </a></td>
+	<td><a href="gpc1/i/i.gpc1.east.fits" download> FITS </a></td>
+	<td><a href="gpc1/z/z.gpc1.east.fits" download> FITS </a></td>
+	<td><a href="gpc1/y/y.gpc1.east.fits" download> FITS </a></td>
+	<td><a href="gpc1/w/w.gpc1.east.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/g/g.gpc1.pole.png"></a></td>
+	<td><a href="gpc1/r/r.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/r/r.gpc1.pole.png"></a></td>
+	<td><a href="gpc1/i/i.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/i/i.gpc1.pole.png"></a></td>
+	<td><a href="gpc1/z/z.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/z/z.gpc1.pole.png"></a></td>
+	<td><a href="gpc1/y/y.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/y/y.gpc1.pole.png"></a></td>
+	<td><a href="gpc1/w/w.gpc1.pole.png" target="_blank"><img width=200 src="gpc1/w/w.gpc1.pole.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc1/g/g.gpc1.pole.fits" download> FITS </a></td>
+	<td><a href="gpc1/r/r.gpc1.pole.fits" download> FITS </a></td>
+	<td><a href="gpc1/i/i.gpc1.pole.fits" download> FITS </a></td>
+	<td><a href="gpc1/z/z.gpc1.pole.fits" download> FITS </a></td>
+	<td><a href="gpc1/y/y.gpc1.pole.fits" download> FITS </a></td>
+	<td><a href="gpc1/w/w.gpc1.pole.fits" download> FITS </a></td>
+      </tr>
+    </table><br><br>
+    <table>
+      <tr><th style="font-size:200%;" colspan=6>PS2</th></tr>
+      <tr><th>g</th><th>r</th><th>i</th><th>z</th><th>y</th><th>w</th></tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.west.png" target="_blank"><img width=200 src="gpc2/g/g.gpc2.west.png"></a></td>
+	<td><a href="gpc2/r/r.gpc2.west.png" target="_blank"><img width=200 src="gpc2/r/r.gpc2.west.png"></a></td>
+	<td><a href="gpc2/i/i.gpc2.west.png" target="_blank"><img width=200 src="gpc2/i/i.gpc2.west.png"></a></td>
+	<td><a href="gpc2/z/z.gpc2.west.png" target="_blank"><img width=200 src="gpc2/z/z.gpc2.west.png"></a></td>
+	<td><a href="gpc2/y/y.gpc2.west.png" target="_blank"><img width=200 src="gpc2/y/y.gpc2.west.png"></a></td>
+	<td><a href="gpc2/w/w.gpc2.west.png" target="_blank"><img width=200 src="gpc2/w/w.gpc2.west.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.west.fits" download> FITS </a></td>
+	<td><a href="gpc2/r/r.gpc2.west.fits" download> FITS </a></td>
+	<td><a href="gpc2/i/i.gpc2.west.fits" download> FITS </a></td>
+	<td><a href="gpc2/z/z.gpc2.west.fits" download> FITS </a></td>
+	<td><a href="gpc2/y/y.gpc2.west.fits" download> FITS </a></td>
+	<td><a href="gpc2/w/w.gpc2.west.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.east.png" target="_blank"><img width=200 src="gpc2/g/g.gpc2.east.png"></a></td>
+	<td><a href="gpc2/r/r.gpc2.east.png" target="_blank"><img width=200 src="gpc2/r/r.gpc2.east.png"></a></td>
+	<td><a href="gpc2/i/i.gpc2.east.png" target="_blank"><img width=200 src="gpc2/i/i.gpc2.east.png"></a></td>
+	<td><a href="gpc2/z/z.gpc2.east.png" target="_blank"><img width=200 src="gpc2/z/z.gpc2.east.png"></a></td>
+	<td><a href="gpc2/y/y.gpc2.east.png" target="_blank"><img width=200 src="gpc2/y/y.gpc2.east.png"></a></td>
+	<td><a href="gpc2/w/w.gpc2.east.png" target="_blank"><img width=200 src="gpc2/w/w.gpc2.east.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.east.fits" download> FITS </a></td>
+	<td><a href="gpc2/r/r.gpc2.east.fits" download> FITS </a></td>
+	<td><a href="gpc2/i/i.gpc2.east.fits" download> FITS </a></td>
+	<td><a href="gpc2/z/z.gpc2.east.fits" download> FITS </a></td>
+	<td><a href="gpc2/y/y.gpc2.east.fits" download> FITS </a></td>
+	<td><a href="gpc2/w/w.gpc2.east.fits" download> FITS </a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/g/g.gpc2.pole.png"></a></td>
+	<td><a href="gpc2/r/r.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/r/r.gpc2.pole.png"></a></td>
+	<td><a href="gpc2/i/i.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/i/i.gpc2.pole.png"></a></td>
+	<td><a href="gpc2/z/z.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/z/z.gpc2.pole.png"></a></td>
+	<td><a href="gpc2/y/y.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/y/y.gpc2.pole.png"></a></td>
+	<td><a href="gpc2/w/w.gpc2.pole.png" target="_blank"><img width=200 src="gpc2/w/w.gpc2.pole.png"></a></td>
+      </tr>
+      <tr>
+	<td><a href="gpc2/g/g.gpc2.pole.fits" download> FITS </a></td>
+	<td><a href="gpc2/r/r.gpc2.pole.fits" download> FITS </a></td>
+	<td><a href="gpc2/i/i.gpc2.pole.fits" download> FITS </a></td>
+	<td><a href="gpc2/z/z.gpc2.pole.fits" download> FITS </a></td>
+	<td><a href="gpc2/y/y.gpc2.pole.fits" download> FITS </a></td>
+	<td><a href="gpc2/w/w.gpc2.pole.fits" download> FITS </a></td>
+      </tr>
+    </table>
+  </body>
+</html>
+
+   
