Skip to content

sxccd.dec2image is quite slow #1

@clkotnik

Description

@clkotnik

I found the byte swap in in dec2image to take a very long time. You might consider this implementation:
def dec2image( data, h, w ):
dt = np.dtype('uint16')
dt = dt.newbyteorder('<')
img = np.frombuffer(data, dtype=dt)

img = np.reshape( img, (h, w) )
return img

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions