Skip to content

Commit

Permalink
Removed endian handlers for C, since it should be handled in python.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmacdonald-stsci committed Dec 26, 2023
1 parent 5963699 commit 16a5947
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/stcal/ramp_fitting/src/slope_fitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,16 @@ get_ramp_data_endianness(
struct ramp_data * rd)
{
/* Set getter functions based on type, dimensions, and endianness */
rd->get_data = get_float4;
rd->get_err = get_float4;

rd->get_pixeldq = get_uint32_2;

rd->get_gain = get_float2;
rd->get_rnoise = get_float2;
rd->get_zframe = get_float3;

# if 0
rd->get_data = (PyArray_ISBYTESWAPPED(rd->data)) ? get_float4_swp : get_float4;
rd->get_err = (PyArray_ISBYTESWAPPED(rd->err)) ? get_float4_swp : get_float4;

Expand All @@ -1783,6 +1793,7 @@ get_ramp_data_endianness(
rd->get_gain = (PyArray_ISBYTESWAPPED(rd->gain)) ? get_float2_swp : get_float2;
rd->get_rnoise = (PyArray_ISBYTESWAPPED(rd->rnoise)) ? get_float2_swp : get_float2;
rd->get_zframe = (PyArray_ISBYTESWAPPED(rd->zframe)) ? get_float3_swp : get_float3;
#endif
}

/*
Expand Down

0 comments on commit 16a5947

Please sign in to comment.