psrzap not enough colors available

0 votes

I'm getting this error from psrzap:

% psrzap -v GUPPI_J2339-0533_56798_42824_0001.fits

>> Using baseline method

DynamicSpectrumPlot data min/max = (0.00187616574112326,0.0604446046054363)

 %PGPLOT, PGIMAG: not enough colors available

 

This happens on my Mac, running OS X 10.9.3 and XQuartz 2.7.6. My PGPLOT_DEV is set to /xs.

 

My guess is that one window eats up 256 colors and the other then can't allocate colors.  I'm not sure how to work around this.  Can I tell psrzap to use the TrueColor visual or something like that?

 

Any suggestions?

 
asked May 28, 2014 by PaulRay (160 points)

2 Answers

0 votes
Hi Paul,

This is not a psrchive issue but pgplot. You can try recompiling pgplot with more colours supported, try modifying the variable XW_MAX_COLORS in pgxwin_server.c.

Brief inspection of the code reveals that also pgxwin.c needs to be modified - search for max_col in this file to see where. There may be more places where you'd need to modify the code although I think this are the only places. I guess back in the days these constraint made sense due to memory lmitations but now there is no reasons to stick to it.

Hope this helps,

Stefan
answered May 28, 2014 by sosl (780 points)
edited May 28, 2014 by sosl
Actually I think this won't work as the limitation of 256 colours in pgplot is rooted deeper in - it uses 8 bit colour depth.

In this case, it would be good to figure out why does psrzap make pgplot think more than 256 colours are necessary but I am unable to reproduce this behaviour. Could you place your archive on some filesharing service so that I can download it and see what happens?

Thanks,
Stefan
0 votes
Thanks for the reply!  Looking at PGPLOT led me to the answer.  I had some pgxwin variables set in my .Xdefaults that must have been causing the problem. When I deleted them and restarted my X server, everything worked fine.
answered May 29, 2014 by PaulRay (160 points)
...