Skip to content

large tolerances in test_pvsystem.test_singlediode_floats_ivcurve #414

Closed

Description

@mikofski

the absolute tolerance to compare test and expected output is 3 in test_pvsystem.test_singlediode_floats_ivcurve which allows almost any values to pass:

e.g.:

>>> out['i_sc'], expected['i_sc']
(6.9651723221583133, 6.96467476139632)
>>> np.isclose(out['i_sc'], expected['i_sc'])
False
>>> np.isclose(out['i_sc'], expected['i_sc'], atol=3)
True
>>> out['v_oc'], expected['v_oc']
(8.1063001465863103, 8.106300146586308)
>>> out['v_mp'], expected['v_mp']
(6.2243393757884284, 6.221535886625464)
>>> out['i_mp'], expected['i_mp']
(6.1362673597376753, 6.13902517979357)
>>> out['i'], expected['i']
(array([  7.00000000e+00,   6.53439455e+00,   3.48054918e-14]),
 array([  6.96517200e+00,   6.75588200e+00,   2.57571700e-14]))
>>> out['v'], expected['v']
(array([-0.7       ,  5.5749351 ,  8.10630015]),
 array([ 0.     ,  4.05315,  8.1063 ]))

IMHO these tolerance should be closer to 1e-3 maybe, or maybe set rtol?

Activity

  1. adriesse commented on Jan 31, 2018

    @adriesse
    Member

    Looks like a serious typo! I vote for rtol.

  2. added this to the 0.5.2 milestone on Jan 31, 2018
  3. wholmgren commented on Jan 31, 2018

    @wholmgren
    Member

    Yes. Probably best to merge a fix for this before merging #409. Do you want to make the PR? I can do a quick one this afternoon if you want to stay focused on your current pvlib work.

  4. markcampanelli commented on Jan 31, 2018

    @markcampanelli
    Contributor

    Nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions