problem reading 8 bit array

I am trying to run some Neopixels with a gamma correction routine by Adafruit.
It isn’t working as it should so I stripped it down to the bare bones and found that what is being printed does not match the array I am trying to print.

Can anyone tell me what I am doing wrong?

const uint8_t PROGMEM gamma8[] = {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1,  1,  1,  1,
      1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,
      3,  3,  4,  4,  4,  4,  5,  5,  5,  5,  5,  6,  6,  6,  6,  7,
      7,  7,  8,  8,  8,  9,  9,  9, 10, 10, 10, 11, 11, 11, 12, 12,
     13, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20,
     20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29,
     30, 31, 31, 32, 33, 34, 34, 35, 36, 37, 38, 38, 39, 40, 41, 42,
     42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
     58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75,
     76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 89, 90, 92, 93, 94, 96,
     97, 99,100,102,103,105,106,108,109,111,112,114,115,117,119,120,
    122,124,125,127,129,130,132,134,136,137,139,141,143,145,146,148,
    150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,
    182,184,186,188,191,193,195,197,199,202,204,206,209,211,213,215,
    218,220,223,225,227,230,232,235,237,240,242,245,247,250,252,255
};

void setup() {
  Serial.begin(9600);
  for (int i=0;i<255;i++) {Serial.print((uint8_t)gamma8[i]);Serial.print(",");}
}

void loop() {

}

the output string looks like this:
0,0,2,0,0,0,1,0,0,2,2,2,2,2,2,2,
0,0,135,0,0,2,0,0,1,3,0,2,110,0,0,0,
0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,1,4,215,0,0,2,0,2,
0,248,254,255,0,0,2,2,2,184,6,2,207,0,0,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,44,0,0,0,0,0,123,2,32,3,17,
2,66,2,34,2,107,2,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,44,48,44,48,44,48,44,52,52,44,53,
50,44,53,50,44,52,

Serial.print((uint8_t)gamma8[i]);

You've moved the data to PROGMEM. You need to use the pgm_read... functions to access it.

Thanks paulS
One quick question, Im doing a POV Globe and need to access data at a fast rate. Im using SPI for that but the array of data could slow things down on the input end.

Is using PROGMEM advantageous for accessing data from a very large array?

The globe is 48x200 so the array would hold 9600 values between 0-256

Im using SPI for that but the array of data could slow things down on the input end.

For that? What is that?

Is using PROGMEM advantageous for accessing data from a very large array?

If the array doesn't fit in SRAM, yes, PROGMEM is advantageous. If it does, PROGMEM is slower to access than SRAM.

I think accessing from SRAM is faster. I made a 14,625 byte array in a '1284P (16K SRAM) and can read from it to send out via SPI to shift registers at a nearly 1uS/byte rate, I think 17 clocks/byte, so about 48uS for 45 bytes.

Had to do some tricks tho - no looping, but 45 lines of this:

SPDR = dataArray[startPoint+0]; then nop; 15 times
SPDR = dataArray[startPoint+1]; then nop; 15 times
SPDR = dataArray[startPoint+2]; then nop; 15 times
:
:
SPDR = dataArray[startPoint+44]; then nop; 15 times

Then startPoint was incremented by 325 for the next pass.
There's an entry you have to add to the top of the sketch so the nop gets processed as an assembly command.

And SPI divisor was set to 2 for 8 MHz SCK.

Thanks Crossroads!

PaulS, Im making a Persistence of Vision Display where you take 48 leds and spin them really fast while blinking to a synchronized sequence. The eye is fooled into thinking its seeing a full circle of 9600 leds