The Conversion
There are quite a few variables involved here, and the biggest problem comes from unit conversion. Most likely, the measured surface brightness from real data is in magnitudes per square arcsecond. We can arbitrarily define the conversion from mag/arcsec^2 to counts/arcsec^2. If we are dealing with multiple surface brightnesses though, all of them must be scaled in the same manner. For the sake of simplicity, it's easy to define one of your magnitudes as being equal to 10.0 counts/arcsec^2.
We also need to figure out the number of square arcseconds per pixel in our fake galaxy. The code for csb.f and fakegal.nonoise.f do all arithmetic in pixels. Since we are dealing with real sizes, most values for galaxy scale heights and lengths are in kpc. First, we have to choose how fine a resolution we want in the model. My work was done with the resolution that each pixel was 100pc by 100pc. As a result, one pixel is 10000pc^2. You then need to figure out how many parsecs are in 1 arcsecond at the distance of your target galaxy. I am working with M31, which has a distance of 770kpc. We can use simple trig to see that:
tan(theta)=(1pc/770000pc)
theta=arctan(1/770000)=7.44*10^-5
This means that 1 parsec in M31 covers 7.44*10^-5 degrees on the sky. Multiply this by 3600 to convert to pc per arcsecond and the result is 1pc = 0.2679arcseconds. Square this to see that 1pc^2 = (0.2679arcseconds)^2 = 0.0718arcsec^2. We have 10000pc^2 in one pixel, so multiply 0.0718 by 10000 to get 718 arcsec^2 per pixel.
We now know how many square arcseconds are in one pixel, and how many counts are in one square arcsecond. Multiply the two values to get a variable that has units in counts per pixel.
Putting the numbers into csb.f
The program csb.f asks for 4 input parameters: scale length, scale height, maximum radius, and inclination. These must all be entered in pixels. As an example, if I am looking at M31 with the resolution 1 pixel is 100pc by 100pc, the values for the above parameters are 53, 3, 600(for what I am examining), and 13. The program assumes that the intensity at point (0,0) is 1.0 (the variable is named L_0). Using this number, it integrates along a line of sight through (0,0) and gives the total intensity that the central pixel would detect. From our conversion above though, we know what the intensity at the central pixel should be. If we take our value from the conversions above, and divide it by the output from csb.f, we get the true value of L_0. This value is what needs to be entered into fakegal.nonoise.f for the parameter "Disk central surface brightness L_0.