Opened 8 years ago

#43 new defect

shift_correlation_function() raises numpy warning

Reported by: flip Owned by: bsoher
Priority: minor Milestone:
Component: other Version:
Keywords: Cc:

Description

shift_correlation_function() in shiftopt.py contains this line:

cc   = np.corrcoef(data, info['expo'])

Passing complex data to this will result in the familiar "Casting complex values to real discards the imaginary part" numpy warning:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py:1971: ComplexWarning: Casting complex values to real discards the imaginary part
  X = array(m, ndmin=2, dtype=float)

Here's two methods to recreate this.

Method 1

  1. Run the minf_parabolic_info.py unit test

Method 2

  1. Open analysis and load press_cp0
  2. load press_cp0.wref
  3. use the simple ECC filter and use press_cp0.wref as the ECC dataset

Change History (0)

Note: See TracTickets for help on using tickets.