IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 12, 2008, 4:20:57 PM (18 years ago)
Author:
eugene
Message:

convert chiphost tables to ipphosts tables, add lookups for skycellID to host, add in the redirect-output option to stack and diff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pantasks.pro

    r19465 r19545  
    350350  end
    351351
    352   # missing camera and/or chiphosts table results in host = NULL
    353   book getword chiphosts $camera $classID -var host
     352  # missing camera and/or ipphosts table results in host = NULL
     353  book getword ipphosts $camera $classID -var host
    354354
    355355  if ("$host" == "NULL")
     
    360360end
    361361
    362 macro set.volume.by.camera
    363   if ($0 != 3)
    364     echo "USAGE: set.volume.by.camera (camera) (class_id) (template) (default) (varname)"
    365     echo " uses global variable NEBULOUS to determine if nebulous is active"
    366     break
    367   end
    368 
    369   local host default template camera classID varname
    370   $camera = $1
    371   $classID = $2
    372   $template = $3
    373   $default = $4
    374   $varname = $5
    375 
    376   # missing camera and/or chiphosts table results in host = NULL
    377   book getword chiphosts $camera $classID -var host
    378 
    379   if (not($NEBULOUS))
    380     $$varname = "NULL"
    381     return
    382   end
    383 
    384   if ("$host" == "NULL")
    385     $$varname = $default
    386     return
    387   end
    388 
    389   strsub $template @HOST@ $host -var $varname
     362macro set.workdir.by.skycell
     363  if ($0 != 5)
     364    echo "USAGE: set.workdir.by.skycell (skycellID) (template) (default) (varname)"
     365    break
     366  end
     367
     368  local host default template skycellID varname count
     369  $skycellID = $1
     370  $template = $2
     371  $default = $3
     372  $varname = $4
     373
     374  if ("$template" == "NULL")
     375    $varname = $workdir_template
     376    echo "WARNING: WORKDIR template not set.  Defaulting to $workdir_template"
     377    break
     378  end
     379
     380  # get the folding count for this camera 
     381  book getword ipphosts skycell count -var count
     382  if ("$count" == "NULL")
     383    strsub $template @HOST@ $default -var $varname
     384    return
     385  end   
     386
     387  strhash $skycellID $count -var skyhash
     388  sprintf skyname "sky%02d" $skyhash
     389
     390  # missing ipphosts table results in host = NULL
     391  book getword ipphosts skycell $skyname -var host
     392
     393  if ("$host" == "NULL")
     394    strsub $template @HOST@ $default -var $varname
     395  else
     396    strsub $template @HOST@ $host -var $varname
     397  end
    390398end
    391399
     
    396404  end
    397405
     406  local host
     407
    398408  if (not($PARALLEL))
    399409    host local
     
    401411  end
    402412
    403   # missing camera and/or chiphosts table results in host = NULL
    404   book getword chiphosts $1 $2 -var host
     413  # missing camera and/or ipphosts table results in host = NULL
     414  book getword ipphosts $1 $2 -var host
    405415
    406416  if ("$host" == "NULL")
     
    411421end
    412422
     423macro set.host.for.skycell
     424  if ($0 != 2)
     425    echo "USAGE: set.host.for.skycell (skycellID)"
     426    break
     427  end
     428
     429  local skycellID varname count host skyname skyhash
     430  $skycellID = $1
     431
     432  # get the folding count for this camera 
     433  book getword ipphosts skycell count -var count
     434  if ("$count" == "NULL")
     435    host anyhost
     436    return
     437  end   
     438
     439  strhash $skycellID $count -var skyhash
     440  sprintf skyname "sky%02d" $skyhash
     441
     442  # missing ipphosts table results in host = NULL
     443  book getword ipphosts skycell $skyname -var host
     444
     445  if ("$host" == "NULL")
     446    host anyhost
     447  else
     448    host $host
     449  end
     450end
     451
    413452macro get.host.for.camera
    414453  if ($0 != 3)
     
    422461  end
    423462
    424   # missing camera and/or chiphosts table results in host = NULL
    425   book getword chiphosts $1 $2 -var host
     463  # missing camera and/or ipphosts table results in host = NULL
     464  book getword ipphosts $1 $2 -var host
    426465
    427466  if ("$host" == "NULL")
Note: See TracChangeset for help on using the changeset viewer.