Skip to content

Inconsistent distance calculations in dm_to_dist #22

@shutsch

Description

@shutsch

Hi,

It appears to me that there are some inconsistencies with the dm_to_dist function in pygedm.
For some particular lines of sights and radial positions, the predicted distances decrease with increasing DM, which is clearly unphysical, as it would correspond to negative electron densities between the points.

An example script:

import pygedm

gl = 243.49
gb = 45.782

dm_small = 11.21
dm_large = 11.22

print(pygedm.dm_to_dist(gl, gb, dm_small)[0])
print(pygedm.dm_to_dist(gl, gb, dm_large)[0])

This gives:

817.3250122070312 pc
803.8787231445312 pc 

The distance starts to increase again with rising DM from there on.
I have found a couple of dozens of such jumps, I can attach a list if needed.

The electron densities at these points are physical and (roughly) consistent with the increase in DM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    update-docsIssue has useful info and we should update docsupstream-issueIssue is in upstream code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions