Commit 1000df13 authored by Robert Butora's avatar Robert Butora
Browse files

adds s_region_galactic and vel_min vel_max to response/VOTable

parent d15166d9
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ class ObscoreExt
      new ColumnInfo( "overlapSky",  Integer.class, "Overlap Code for Sky axes" ),
      new ColumnInfo( "overlapSky",  Integer.class, "Overlap Code for Sky axes" ),
      new ColumnInfo( "overlapSpec", Integer.class, "Overlap Code for Spectral axis" ),
      new ColumnInfo( "overlapSpec", Integer.class, "Overlap Code for Spectral axis" ),


      new ColumnInfo( "P1lon", Double.class, "P1 longitude" ),
/*      new ColumnInfo( "P1lon", Double.class, "P1 longitude" ),
      new ColumnInfo( "P1lat", Double.class, "P1 latitude" ),
      new ColumnInfo( "P1lat", Double.class, "P1 latitude" ),
      new ColumnInfo( "P2lon", Double.class, "P2 longitude" ),
      new ColumnInfo( "P2lon", Double.class, "P2 longitude" ),
      new ColumnInfo( "P2lat", Double.class, "P2 latitude" ),
      new ColumnInfo( "P2lat", Double.class, "P2 latitude" ),
@@ -103,6 +103,11 @@ class ObscoreExt
      new ColumnInfo( "P3lat", Double.class, "P3 latitude" ),
      new ColumnInfo( "P3lat", Double.class, "P3 latitude" ),
      new ColumnInfo( "P4lon", Double.class, "P4 longitude" ),
      new ColumnInfo( "P4lon", Double.class, "P4 longitude" ),
      new ColumnInfo( "P4lat", Double.class, "P4 latitude" ),
      new ColumnInfo( "P4lat", Double.class, "P4 latitude" ),
*/
      new ColumnInfo( "s_region_galactic", String.class, "Region [GALACTIC]" ),

      new ColumnInfo( "vel_min",    Double.class, "Velocity min" ),
      new ColumnInfo( "vel_max",    Double.class, "Velocity max" ),
 
 
      new ColumnInfo( "file_url",   String.class, "Access URL: all file" ),
      new ColumnInfo( "file_url",   String.class, "Access URL: all file" ),
      new ColumnInfo( "cutout_url", String.class, "Access URL: cut file" ),
      new ColumnInfo( "cutout_url", String.class, "Access URL: cut file" ),
@@ -118,10 +123,15 @@ class ObscoreExt
            Integer.valueOf( dataset.overlapCodeSky ),
            Integer.valueOf( dataset.overlapCodeSky ),
            Integer.valueOf( dataset.overlapCodeVel ),
            Integer.valueOf( dataset.overlapCodeVel ),


            Double.valueOf(dataset.vertices_deg.lon[0]), Double.valueOf(dataset.vertices_deg.lat[0]),
/*            Double.valueOf(dataset.vertices_deg.lon[0]), Double.valueOf(dataset.vertices_deg.lat[0]),
            Double.valueOf(dataset.vertices_deg.lon[1]), Double.valueOf(dataset.vertices_deg.lat[1]),
            Double.valueOf(dataset.vertices_deg.lon[1]), Double.valueOf(dataset.vertices_deg.lat[1]),
            Double.valueOf(dataset.vertices_deg.lon[2]), Double.valueOf(dataset.vertices_deg.lat[2]),
            Double.valueOf(dataset.vertices_deg.lon[2]), Double.valueOf(dataset.vertices_deg.lat[2]),
            Double.valueOf(dataset.vertices_deg.lon[3]), Double.valueOf(dataset.vertices_deg.lat[3]),
            Double.valueOf(dataset.vertices_deg.lon[3]), Double.valueOf(dataset.vertices_deg.lat[3]),
*/
            dataset.obsCore.s_region_galactic,

            dataset.obsCore.vel_min == null ? null : Double.valueOf(dataset.obsCore.vel_min),
            dataset.obsCore.vel_min == null ? null : Double.valueOf(dataset.obsCore.vel_max),


            dataset.access.accessFileUrl,
            dataset.access.accessFileUrl,
            dataset.access.accessCutoutUrl,
            dataset.access.accessCutoutUrl,
+19 −4
Original line number Original line Diff line number Diff line
@@ -47,11 +47,12 @@ public class DbPSearch
      boolean  vel_valid = (coord.band != null) && (coord.band.system != Band.System.NONE);
      boolean  vel_valid = (coord.band != null) && (coord.band.system != Band.System.NONE);
      if(vel_valid)
      if(vel_valid)
      {
      {
         String prefix = toSpecColumnNamePrefix(coord.band.system);
         String vel_no_overlap
         String vel_no_overlap
            = "((em_min > " + Double.toString(coord.band.getMax())
            = "((" + prefix + "_min > " + Double.toString(coord.band.getMax())
            + ") OR (em_max < " + Double.toString(coord.band.getMin()) + "))";
            + ") OR (" + prefix + "_max < " + Double.toString(coord.band.getMin()) + "))";


         theQuery += " AND ( (em_min is null) OR (em_max is null) OR (NOT " + vel_no_overlap + "))";
         theQuery += " AND ( ("+prefix+"_min is null) OR ("+prefix+"_max is null) OR (NOT " + vel_no_overlap + "))";
         /* NOTE '... OR (em_min is null)' statement causes to include 2D datasets if they overlap in sky
         /* NOTE '... OR (em_min is null)' statement causes to include 2D datasets if they overlap in sky
          * It is the legacy-search behaviour - however is that useful ?
          * It is the legacy-search behaviour - however is that useful ?
          */
          */
@@ -210,6 +211,7 @@ public class DbPSearch
            obsCore.s_dec        = res.getDouble("s_dec");
            obsCore.s_dec        = res.getDouble("s_dec");
            obsCore.s_fov        = res.getDouble("s_fov");
            obsCore.s_fov        = res.getDouble("s_fov");
            obsCore.s_region     = res.getString("s_region");
            obsCore.s_region     = res.getString("s_region");
            obsCore.s_region_galactic = res.getString("s_region_galactic");
            obsCore.s_xel1       = res.getLong("s_xel1");
            obsCore.s_xel1       = res.getLong("s_xel1");
            obsCore.s_xel2       = res.getLong("s_xel2");
            obsCore.s_xel2       = res.getLong("s_xel2");
            obsCore.s_resolution = res.getDouble("s_resolution");
            obsCore.s_resolution = res.getDouble("s_resolution");
@@ -220,6 +222,9 @@ public class DbPSearch
            obsCore.t_resolution  = res.getDouble("t_resolution");
            obsCore.t_resolution  = res.getDouble("t_resolution");
            obsCore.t_xel         = res.getLong("t_xel");
            obsCore.t_xel         = res.getLong("t_xel");


            obsCore.vel_min      = res.getDouble("vel_min"); //boolean em_min_valid = !res.wasNull();
            obsCore.vel_max      = res.getDouble("vel_max"); //boolean em_max_valid = !res.wasNull();
 
            obsCore.em_min       = res.getDouble("em_min"); boolean em_min_valid = !res.wasNull();
            obsCore.em_min       = res.getDouble("em_min"); boolean em_min_valid = !res.wasNull();
            obsCore.em_max       = res.getDouble("em_max"); boolean em_max_valid = !res.wasNull();
            obsCore.em_max       = res.getDouble("em_max"); boolean em_max_valid = !res.wasNull();
            obsCore.em_valid     = em_min_valid && em_max_valid;;
            obsCore.em_valid     = em_min_valid && em_max_valid;;
@@ -325,7 +330,17 @@ public class DbPSearch
      return dbRegion;
      return dbRegion;
   }
   }



   private String toSpecColumnNamePrefix(Band.System system)
   {
      // vlkb-volib/Band.System: WAVE_Barycentric, VELO_LSRK, GRID, NONE
      String prefix;
      switch(system)
      {
         case VELO_LSRK: prefix = "vel"; break;
         default: prefix = "em";
      }
      return prefix;
   }




   private void logSqlExInfo(SQLException se)
   private void logSqlExInfo(SQLException se)
+2 −0
Original line number Original line Diff line number Diff line
@@ -233,6 +233,8 @@ public class FormatResponseFilter implements Filter
      boolean inputInsideDb;
      boolean inputInsideDb;
      boolean dbInsideInput;
      boolean dbInsideInput;


      String s_region_galactic;
      Double vel_min, vel_max;
   }
   }




−21 KiB

File deleted.

siav2-vlkb-extensions.tex

deleted100644 → 0
+0 −11
Original line number Original line Diff line number Diff line


VLKB extension above standard SIAv2 has:

* overlap code
* reconstructs full URLs for cutout and merge
* response repeats all input params to the query
* adds subsurvey metadata
* groups the results by (sub)surveys
* adds mergeable (virtual) datasets