BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



class FlippedDataProblem( MultipleOutputProblem )[source]

A FlippedDataProblem is a problem for solving double star orbits, where there is ambiguity of the stars A and B, in a (small) number of datapoints.

In some double stars, it is not always clear which star is the main star A and which is the secundary B, resulting in ambiguity in the angular direction.

Directions with misidentification in A and B, should be flipped. In spherical coordinates (rho,phi) should be (rho,-phi). In rectangular coordinates (x,y) should be replaced by (-x,-y).

Attributes

  • nflip : int
         actual number of flipped datapoints
  • flipped : list of int
         indices of flipped datapoints.

Attributes from Problem
model, xdata, ydata, weights, partype

  • Author : Do Kester

FlippedDataProblem( model=None, xdata=None, ydata=None, weights=None, accuracy=None, nflip=0, copy=None ) [source]

Problem Constructor.

Parameters

  • model : Model
         the model to be solved. One with multiple outputs: model.ndout > 1
  • xdata : array_like
         independent variable
  • ydata : array_like
         dependent variable. shape = (len(xdata), model.ndout)
  • weights : array_like or None
         weights associated with ydata: shape = as xdata or as ydata
  • accuracy : float or ndarray of shape (ndata,)
         accuracy scale for the datapoints
         all the same or one for each data point
  • nflip : int
         Maximum number of datapoints that can be flipped.
  • copy : Problem
         to be copied

copy( ) [source]
Copy.

residuals( param, mockdata=None ) [source]
Returns residuals in a flattened array.

getFlippedData( ) [source]
Return the corrected datapoints.

baseName( ) [source]
Returns a string representation of the model.
Methods inherited from MultipleOutputProblem
Methods inherited from Problem