Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding initial C code to ramp fitting.
Adding the setup.py necessary to install C extensions for ramp fitting. Adding first attempt at C code. Adding a setup.cfg file to be used for setup. Updating calling location and C code. Updated include ordering, as well as returning NoneType. Can compile calling setup.py directly and running a basic script. Still cannot run 'pip install -e .'. This generates a failure saying it's unable to find the numpy module, raising ModuleNotFoundError. Updating setup. Fixing install files to properly work with C extension framework in ramp fitting. Changing names. Updating C code to parse input parameters. Adding ramp handling for each pixel. Updating ramp data structure and pixel ramp data structure. Getting a pixel ramp and printing it to the screen. Updating code style and adding a simple linked list to handle segment computations. Completed median rate computation without flags and without special cases. Cleaning up the code and comments. The non-special case median rate computation now works. Commenting out calls to C extension function. Putting functions in alphabetical order to make them easier to navigate. Alphabetizing the functions to make them easier to search. Finding a bug in the median rate computation. Updating setup and Nympy macro for C based on code review. Fixed the local copy of the DQ for an integration for median rate computation. Completed the median rate calculations that accounts for flags in the ramp. Beginning to update type checking for ndarrays passed to C. Figuring out endianness solution. Still need to figure out how to detect endianness. Checking for a computing byteswapping makes things slower than python. Testing and comparing python to C code. Working on the weighting of a segment for ramp fitting. Continuing with weighted fitting. Finished the segment computations. Removed 'real_t' typedef to make code cleaner. Finished pixel ramp computations but the read noise computation is different from python code. JIC commit. JIC commit. Debugging the segment computation of the read noise variance. Updated the read noise computations for normal segments. Updated the documentation for ramp fitting to make the documentation for clear on the details of the computations. Removed extra blank lines from CI test file. Creating output base arrays and fix use of pixeldq in pixel_ramp. Packaged up output results from the C computations to be passed back to the python code. Adding a square root to the final computation of the combined error for the rate and rateints products. Successful CI tests for basic ramps run through the C extension. JIC commit. Fixing segment pruner. Adding test cases for C extension. Adding cases. Updated the final DQ array. Started implementing the optional results product. Moving debugging print statements. Adding optional results memory managment during ramp fitting. Outputting the optional results product. Some of the values still need to be computed. Updating computing the optional results product. Updating dimensions of the pedestal array. Adding pedestal calculation. Updating where the group time divide happens. Adding special case computation and testing. Tracing bug in special case. Working out slope computation bug. Forcing the use of C extension to ensure CI tests use the C extensions. Updating tests and DQ flag computations. Adding special case for one group segment. Working on special cases. Updating one group ramp testing. The variance computation is correct now, but need to investigate the slope computation, which may also be wrong in python. Working on a new test. Rearranging code to make it easier to read. Refactoring module API. Splitting ramp data getter into multiple, smaller functions. Updating tests, as well as refactoring the module interface. Updating the flags for suppressed ramps. Changing the C interface to make it simpler and easier to read. Cleaning up old code and adding one group suppression flagging. Modifying setup.py to get it to properly install C and cython stuff. Modifying setup to get it to work, since I am not sure how to resolve the conflicts resulting from the use of by C and cython. Updating invalid integrations test. ZEROFRAME test works. Suppressed one group tests work. Updating return code from C extension. Updating test_2_group_cases testing. Bugs were found in the python code, so those should be corrected first before finishing the C code. Updating code and tests for python to account for invalid integrations and invalid groups for median rate calculations. Updating error in median rate computation. Investigating differences on branch with main branch. Properly updating ols_fit.py from main branch updates. Finishing up C translation. Will need to further investigate two group ramp special case for rateints (see test_invalid_integrations). Updating the setup.py file to properly install the cython and c extension modules. Updating tests and setup.py format. Removing unneeded comments. Removing debugging imports. Fixing ZEROFRAME logic bug, as well as removing debugging code. All STCAL CI tests are passing with the C code. Need to check the JWST tests. Updating segment slope calculation for NaN values. Updating computation of read noise variance for bad gain value. Updating the debugging comments, as well as finishing the first group orphan test in JWST CI testing. Updating how the pedestal gets computed. Updating median rate computation for case 1 in JWST. Updating slope fitter to pass case 4 in the JWST CI test. Updating debugging functions. JIC. Changing variable name for failing test. Cleaning up the code. Skipping case 5 which fails for C due to architectural differences. Updating the handling of bad gain values. Base ramp fit and case testing pass. Updating the computation of SNR to handle non-positive values. Updating the ramp fit OLS code for use of C code. Changing declaration statements causing build failures. Added debugging macros. Removing importation of debugging functions used for debugging. Removed endian handlers for C, since it should be handled in python.
- Loading branch information