Skip to content

Linear algebra error crashes detrender #30

@amcody

Description

@amcody

k2sc runs successfully on most of my light curves, but I am finding that for a percent or two of them, it returns an error in the section of gp.py that calls scipy.linalg.cho_factor.

k2sc/src/gp.py

Lines 83 to 84 in 33eedb9

self._K = self._K0 + self.kernel._pm[-1]**2 * identity(self._K0.shape[0])
self._L = sla.cho_factor(self._K)

The particular error message is numpy.linalg.LinAlgError: 943-th leading minor of the array is not positive definite
(though the number 943 changes from light curve to light curve), and it causes a fatal crash. I don't understand why this is happening, as the offending light curves do not have any obvious defects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions