Skip to content

Commit

Permalink
photcal: Fix access to fit parameter table
Browse files Browse the repository at this point in the history
The parameter table contains all fit parameters. These are changed by
the fit subroutine (NLFIT), which expects to have them in a
homogenious "real" (4 byte) array, with subsequent entries directly
neighored. Therefore, the array cannot be set with `Memr[P2R(base+index)]`,
but needs to be set with `Memr[P2R(base)+index]`. This patch changes
this in a consistent way.
  • Loading branch information
olebole committed Feb 4, 2018
1 parent f4a1f5c commit 49bcfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noao/digiphot/photcal/lib/prstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ define PTEQ_FITCNT Memi[PTEQ_SFITCNT($1) + $2 - 1] # fit var. counter
# Individual access for fitting parameter symbols, values and list. The
# second argument is the parameter number, relative to the equation.
define PTEQ_PAR Memi[PTEQ_SPAR($1) + $2 - 1] # symbol offset
define PTEQ_PARVAL Memr[P2R(PTEQ_SPARVAL($1) + $2 - 1)] # value
define PTEQ_PARVAL Memr[P2R(PTEQ_SPARVAL($1)) + $2 - 1] # value
define PTEQ_PLIST Memi[PTEQ_SPLIST($1) + $2 - 1] # list element

# Individual access for derivative equation string offsets and codes. The
Expand Down

0 comments on commit 49bcfac

Please sign in to comment.