Ignore:
Timestamp:
11/25/15 15:49:41 (8 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...


Bug fix on index range check. It seems that current code allows index 4. But I think valid index range should be 0 <= index <= 4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STPolLinear.cpp

    r2163 r3080  
    3030Vector<Float> asap::STPolLinear::getStokes( uint index )
    3131{
    32   if ( index > 4 ) throw(AipsError("Stokes index out of range"));
     32  if ( index >= 4 ) throw(AipsError("Stokes index out of range"));
    3333  Vector<Float> out;
    3434  Float phase = getTotalPhase();
     
    6161    throw(AipsError("You must have 4 linear polarizations to run this function"));
    6262  }
    63   if ( index >4 ) throw(AipsError("LinPol index out of range"));
     63  if ( index >= 4 ) throw(AipsError("LinPol index out of range"));
    6464  Vector<Float> out,q,u;
    6565  if ( nspec() == 4) {
Note: See TracChangeset for help on using the changeset viewer.