Changes between Version 1 and Version 2 of TenthQuery


Ignore:
Timestamp:
01/09/07 11:13:44 (11 years ago)
Author:
detwiler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TenthQuery

    v1 v2  
    22 
    33{{{ 
    4 let $target_ant := -32 
    5 let $ant_dev := 5 
     4let $target_x_mni := -65 
     5let $x_dev := 5 
    66 
    7 let $target_sup := 18 
    8 let $sup_dev := 5 
     7let $target_y_mni := -57 
     8let $y_dev := 5 
    99 
    10 let $target_right := 59 
    11 let $right_dev := 5 
     10let $target_z_mni := 0 
     11let $z_dev := 5 
    1212 
    1313let $inverse := 
     
    3838                for $sitemap_elt in $p/surgery/sitetoanatomymap[preference='1']/sitetoanatomymapelement[stimsite/_oid = $oid] 
    3939                return     
    40                   <magnet_coordinates x0='{$sitemap_elt/ant_coord/text()}' y0='{$sitemap_elt/sup_coord/text()}'  
    41                       z0='{$sitemap_elt/right_coord/text()}' space0='P{$p/pnum}' space='MNI'> 
     40                  <magnet_coordinates x0='{$sitemap_elt/right_coord/text()}' y0='{$sitemap_elt/ant_coord/text()}'  
     41                      z0='{$sitemap_elt/sup_coord/text()}' space0='P{$p/pnum}' space='MNI'> 
    4242                      <ant_coord>{$sitemap_elt/ant_coord/text()}</ant_coord> 
    4343                      <sup_coord>{$sitemap_elt/sup_coord/text()}</sup_coord> 
     
    7474let $sites_in_region := 
    7575    for $stimsite in $patient/surgery/stimsite 
    76     let $ant := number($stimsite//magnet_coordinates/@x) 
    77     let $sup := number($stimsite//magnet_coordinates/@y) 
    78     let $right := number($stimsite//magnet_coordinates/@z) 
    79     where (exists($stimsite/trialcode) and $target_ant - $ant_dev lt $ant) and ($ant lt $target_ant + $ant_dev) and  
    80         ($target_sup - $sup_dev lt $sup) and ($sup lt $target_sup + $sup_dev) and  
    81         ($target_right - $right_dev lt $right) and ($right lt $target_right + $right_dev)     
     76    let $x := number($stimsite//magnet_coordinates/@x) 
     77    let $y := number($stimsite//magnet_coordinates/@y) 
     78    let $z := number($stimsite//magnet_coordinates/@z) 
     79    where (exists($stimsite/trialcode) and $target_y_mni - $y_dev lt $y) and ($y lt $target_y_mni + $y_dev) and  
     80        ($target_z_mni - $z_dev lt $z) and ($z lt $target_z_mni + $z_dev) and  
     81        ($target_x_mni - $x_dev lt $x) and ($x lt $target_x_mni + $x_dev)     
    8282    return 
    8383        $stimsite