miriad 4.1.0.8 → 4.1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +2 -2
  2. data/ext/uvio.c +16 -9
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # $Id: Rakefile 26 2008-05-09 23:28:16Z davidm $
1
+ # $Id: Rakefile 31 2008-05-16 20:11:25Z davidm $
2
2
 
3
3
  require 'rubygems'
4
4
  require 'rake/gempackagetask'
@@ -14,7 +14,7 @@ run_swig unless test ?e, 'ext/miriad_wrap.c'
14
14
  spec = Gem::Specification.new do |s|
15
15
  # Basics
16
16
  s.name = 'miriad'
17
- s.version = '4.1.0.8'
17
+ s.version = '4.1.0.10'
18
18
  s.summary = 'Ruby interface to MIRIAD'
19
19
  s.description = <<-EOS
20
20
  The MIRIAD-Ruby package...
data/ext/uvio.c CHANGED
@@ -165,8 +165,11 @@
165
165
  /* pjt 25apr06 Add ATNF's new uvdim_c and match sourcenames w/o case */
166
166
  /* pjt 22aug06 merged versions; finish dazim/delev selection code */
167
167
  /* pjt 22may07 added code for purpose, fixed uvread_match() */
168
- /* pjt 06feb08 allow seeing() selection on smonrms and rmspath */
168
+ /* pjt 06feb08 allow seeing() selection on smonrms or rmspath */
169
169
  /* cf. 08oct07 addition to ATNF version of uvio.c */
170
+ /* pjt 8may08 wrap HA back into -12..12 from -24..24.. */
171
+ /* dhem 13may08 Change uvputvr_c to always update var's buffer */
172
+ /* dhem 14may08 uvputvr_c always reallocs var's buffer on size change */
170
173
  /*----------------------------------------------------------------------*/
171
174
  /* */
172
175
  /* Handle UV files. */
@@ -257,7 +260,7 @@
257
260
  /* list to be formed for hashing. */
258
261
  /* */
259
262
  /*----------------------------------------------------------------------*/
260
- #define VERSION_ID "6-feb-08 pjt"
263
+ #define VERSION_ID "8-may-08 pjt"
261
264
 
262
265
  #define private static
263
266
 
@@ -1710,8 +1713,7 @@ void uvputvr_c(int tno,int type,Const char *var,Const char *data,int n)
1710
1713
  hwritei_c(uv->item,&v->length,uv->offset+UV_HDR_SIZE,H_INT_SIZE,&iostat);
1711
1714
  CHECK(iostat,(message,"Error writing variable-length for %s, in UVPUTVR",var));
1712
1715
  uv->offset += UV_ALIGN;
1713
- if( !(v->flags & UVF_NOCHECK) )
1714
- v->buf = Realloc(v->buf,n*internal_size[type]);
1716
+ v->buf = Realloc(v->buf,n*internal_size[type]);
1715
1717
  }
1716
1718
 
1717
1719
  /* Check if this variable has really changed. */
@@ -1740,10 +1742,12 @@ void uvputvr_c(int tno,int type,Const char *var,Const char *data,int n)
1740
1742
  uv->offset = mroundup( uv->offset+v->length, UV_ALIGN);
1741
1743
  if(v->callno++ > CHECK_THRESH) {
1742
1744
  v->flags |= UVF_NOCHECK;
1743
- } else if(!(v->flags & UVF_NOCHECK)){
1744
- length = internal_size[type] * n;
1745
- memcpy(v->buf,data,length);
1746
- }
1745
+ }
1746
+ length = internal_size[type] * n;
1747
+ if(!v->buf) {
1748
+ ERROR('f',(message,"Buffer for variable '%s' is NULL in UVPUTVR",var));
1749
+ }
1750
+ memcpy(v->buf,data,length);
1747
1751
  } else {
1748
1752
  v->callno = 0;
1749
1753
  }
@@ -2260,7 +2264,7 @@ void uvselect_c(int tno,Const char *object,double p1,double p2,int datasel)
2260
2264
  "uvrange","pointing","amplitude","window","or","dra",
2261
2265
  "ddec","uvnrange","increment","ra","dec","and", "clear",
2262
2266
  "on","polarization","shadow","auto","dazim","delev",
2263
- "purpose","seeing"
2267
+ "purpose","seeing" (should be 28?)
2264
2268
  p1,p2 Generally this is the range of values to select. For
2265
2269
  "antennae", this is the two antennae pair to select.
2266
2270
  For "antennae", a zero indicates "all antennae".
@@ -3438,6 +3442,9 @@ private int uvread_select(UV *uv)
3438
3442
  if(op->type == SEL_HA){
3439
3443
  discard = !op->discard;
3440
3444
  ha = *(double *)uv->lst->buf - *(double *)uv->obsra->buf;
3445
+ /* ha can be -24..24 so needs to be back to -12..12 */
3446
+ if (ha < -PI) ha += 2*PI;
3447
+ if (ha > PI) ha -= 2*PI;
3441
3448
  while(n < sel->noper && op->type == SEL_HA){
3442
3449
  if(op->loval <= ha && ha <= op->hival)
3443
3450
  discard = op->discard;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miriad
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.8
4
+ version: 4.1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David MacMahon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-09 00:00:00 -07:00
12
+ date: 2008-05-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency