Broken CGFIXPS routine? [message #94708] |
Thu, 31 August 2017 16:21  |
Matteo
Messages: 28 Registered: August 2011
|
Junior Member |
|
|
Hi,
I was trying to generate a plot in a way that was used to work, as in:
CGPS_OPEN, filename='testplot.ps'
CGPLOT, FINDGEN(10)
CGPS_CLOSE, /pdf
but know I obtained the error message: "CGPS_CLOSE -> Attempt to call undefined procedure: CGFIXPS". I obviously have CGFIXPS in the Coyote library, but the problem seem to be in the following lines (as it seems to have been noted here: https://github.com/idl-coyote/coyote/issues/11). Any idea on the best fix for this issue?
<<<<<<< HEAD
Get_Lun, in_lun
OpenR, in_lun, in_filename
=======
>>>> >>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
IF (FStat(in_lun)).size EQ 0 THEN BEGIN
Free_lun, in_lun
Free_lun, out_lun
File_Delete, out_filename
;Print, 'Zero Length File Encountered...'
RETURN
ENDIF
<<<<<<< HEAD
; Move along in the file until the end of the Prolog.
line = ""
count = 0
target = "void"
buffer = StrArr(100)
=======
>>>> >>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
|
|
|
Re: Broken CGFIXPS routine? [message #94709 is a reply to message #94708] |
Fri, 01 September 2017 07:19   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
So I assume that cgfixps.pro is not found because it is not compiling
IDL> .run cgfixps
because of spurious characters introduced during a bad merge. This was fixed on the GitHub site (according to the link you give) but still seems to be broken on the main Coyote site
http://www.idlcoyote.com/programs/cgfixps.pro
So I would make sure you get your copy of cgfixps.pro from GitHub
https://github.com/idl-coyote/coyote/blob/master/cgfixps.pro
--Wayne
On Thursday, August 31, 2017 at 7:21:40 PM UTC-4, Matteo wrote:
> Hi,
>
> I was trying to generate a plot in a way that was used to work, as in:
>
> CGPS_OPEN, filename='testplot.ps'
> CGPLOT, FINDGEN(10)
> CGPS_CLOSE, /pdf
>
> but know I obtained the error message: "CGPS_CLOSE -> Attempt to call undefined procedure: CGFIXPS". I obviously have CGFIXPS in the Coyote library, but the problem seem to be in the following lines (as it seems to have been noted here: https://github.com/idl-coyote/coyote/issues/11). Any idea on the best fix for this issue?
>
>
>
> <<<<<<< HEAD
> Get_Lun, in_lun
> OpenR, in_lun, in_filename
> =======
>>>> >>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
> IF (FStat(in_lun)).size EQ 0 THEN BEGIN
> Free_lun, in_lun
> Free_lun, out_lun
> File_Delete, out_filename
> ;Print, 'Zero Length File Encountered...'
> RETURN
> ENDIF
>
> <<<<<<< HEAD
> ; Move along in the file until the end of the Prolog.
> line = ""
> count = 0
> target = "void"
> buffer = StrArr(100)
>
> =======
>>>> >>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
|
|
|
Re: Broken CGFIXPS routine? [message #94712 is a reply to message #94709] |
Fri, 01 September 2017 17:46   |
Matteo
Messages: 28 Registered: August 2011
|
Junior Member |
|
|
Thank you Wayne for looking into this!
I think this fixes that particular step, although I recently installed a new IDL on my laptop and now I encounter the issue with cgImageMagick not being found. I went through the various posts on this (see e.g: http://www.idlcoyote.com/cg_tips/findimonmac.php) but it gets a bit involved...is there a clear sequence of steps to link IDL to the right place? I seem to understand the problem is with the "convert" executable. I tried to download the last version of ImageMagick and it got unpacked in the Applications/ directory but nothing changes. Note that I tried to use the older PS_START and PS_END commands, everything runs fine but the generates ps file is blank.
Running IDL 8.6.1 on Mac/OS (Yosemite).
I hope somebody can help...
On Friday, September 1, 2017 at 10:19:06 AM UTC-4, wlandsman wrote:
> So I assume that cgfixps.pro is not found because it is not compiling
>
> IDL> .run cgfixps
>
> because of spurious characters introduced during a bad merge. This was fixed on the GitHub site (according to the link you give) but still seems to be broken on the main Coyote site
> http://www.idlcoyote.com/programs/cgfixps.pro
> So I would make sure you get your copy of cgfixps.pro from GitHub
>
> https://github.com/idl-coyote/coyote/blob/master/cgfixps.pro
>
> --Wayne
>
> On Thursday, August 31, 2017 at 7:21:40 PM UTC-4, Matteo wrote:
>> Hi,
>>
>> I was trying to generate a plot in a way that was used to work, as in:
>>
>> CGPS_OPEN, filename='testplot.ps'
>> CGPLOT, FINDGEN(10)
>> CGPS_CLOSE, /pdf
>>
>> but know I obtained the error message: "CGPS_CLOSE -> Attempt to call undefined procedure: CGFIXPS". I obviously have CGFIXPS in the Coyote library, but the problem seem to be in the following lines (as it seems to have been noted here: https://github.com/idl-coyote/coyote/issues/11). Any idea on the best fix for this issue?
>>
>>
>>
>> <<<<<<< HEAD
>> Get_Lun, in_lun
>> OpenR, in_lun, in_filename
>> =======
>>>> >>>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
>> IF (FStat(in_lun)).size EQ 0 THEN BEGIN
>> Free_lun, in_lun
>> Free_lun, out_lun
>> File_Delete, out_filename
>> ;Print, 'Zero Length File Encountered...'
>> RETURN
>> ENDIF
>>
>> <<<<<<< HEAD
>> ; Move along in the file until the end of the Prolog.
>> line = ""
>> count = 0
>> target = "void"
>> buffer = StrArr(100)
>>
>> =======
>>>> >>>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
|
|
|
Re: Broken CGFIXPS routine? [message #94715 is a reply to message #94712] |
Mon, 04 September 2017 17:24   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
A couple of things are unclear in your post.
1. You say you installed ImageMagick. Does it work (outside of IDL)? Can you convert (from the MacOS terminal prompt) a postscript file to PDF
convert idl.ps idl.pdf
2. IDL simply spawns a call to ImageMagick to convert the postscript file so there shouldn't be any special steps needed to "link" IDL. But you also mention a problem with the created postscript file, which would have nothing to do with ImageMagick. Are you able to run your program and successfully create a postscript plot? --Wayne
On Friday, September 1, 2017 at 8:46:42 PM UTC-4, Matteo wrote:
> I think this fixes that particular step, although I recently installed a new IDL on my laptop and now I encounter the issue with cgImageMagick not being found. I went through the various posts on this (see e.g: http://www.idlcoyote.com/cg_tips/findimonmac.php) but it gets a bit involved...is there a clear sequence of steps to link IDL to the right place? I seem to understand the problem is with the "convert" executable. I tried to download the last version of ImageMagick and it got unpacked in the Applications/ directory but nothing changes. Note that I tried to use the older PS_START and PS_END commands, everything runs fine but the generates ps file is blank.
>
> Running IDL 8.6.1 on Mac/OS (Yosemite).
>
> I hope somebody can help...
>
>
>
>
>
>
>
>
> On Friday, September 1, 2017 at 10:19:06 AM UTC-4, wlandsman wrote:
>> So I assume that cgfixps.pro is not found because it is not compiling
>>
>> IDL> .run cgfixps
>>
>> because of spurious characters introduced during a bad merge. This was fixed on the GitHub site (according to the link you give) but still seems to be broken on the main Coyote site
>> http://www.idlcoyote.com/programs/cgfixps.pro
>> So I would make sure you get your copy of cgfixps.pro from GitHub
>>
>> https://github.com/idl-coyote/coyote/blob/master/cgfixps.pro
>>
>> --Wayne
>>
>> On Thursday, August 31, 2017 at 7:21:40 PM UTC-4, Matteo wrote:
>>> Hi,
>>>
>>> I was trying to generate a plot in a way that was used to work, as in:
>>>
>>> CGPS_OPEN, filename='testplot.ps'
>>> CGPLOT, FINDGEN(10)
>>> CGPS_CLOSE, /pdf
>>>
>>> but know I obtained the error message: "CGPS_CLOSE -> Attempt to call undefined procedure: CGFIXPS". I obviously have CGFIXPS in the Coyote library, but the problem seem to be in the following lines (as it seems to have been noted here: https://github.com/idl-coyote/coyote/issues/11). Any idea on the best fix for this issue?
>>>
>>>
>>>
>>> <<<<<<< HEAD
>>> Get_Lun, in_lun
>>> OpenR, in_lun, in_filename
>>> =======
>>>> >>>>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
>>> IF (FStat(in_lun)).size EQ 0 THEN BEGIN
>>> Free_lun, in_lun
>>> Free_lun, out_lun
>>> File_Delete, out_filename
>>> ;Print, 'Zero Length File Encountered...'
>>> RETURN
>>> ENDIF
>>>
>>> <<<<<<< HEAD
>>> ; Move along in the file until the end of the Prolog.
>>> line = ""
>>> count = 0
>>> target = "void"
>>> buffer = StrArr(100)
>>>
>>> =======
>>>> >>>>>> 8ba3a7b34691137b0d0b3d3f508b434ded51fa12
|
|
|
Re: Broken CGFIXPS routine? [message #94717 is a reply to message #94715] |
Tue, 05 September 2017 05:16   |
Matteo
Messages: 28 Registered: August 2011
|
Junior Member |
|
|
On Tuesday, September 5, 2017 at 2:25:02 AM UTC+2, wlandsman wrote:
> A couple of things are unclear in your post.
>
> 1. You say you installed ImageMagick. Does it work (outside of IDL)? Can you convert (from the MacOS terminal prompt) a postscript file to PDF
>
> convert idl.ps idl.pdf
>
> 2. IDL simply spawns a call to ImageMagick to convert the postscript file so there shouldn't be any special steps needed to "link" IDL. But you also mention a problem with the created postscript file, which would have nothing to do with ImageMagick. Are you able to run your program and successfully create a postscript plot? --Wayne
Sorry Wayne,
poor wording, my bad. Yes ImageMagick (ImageMagick-6.7.1-10) does seem to work when used from command line.
I'm trying to look more into here:
http://www.idlcoyote.com/graphics_tips/macspawnim.php
I can confirm that my ~/Applications/harris/idl86/bin/bin.darwin.x86_64/idl_url.dl m file reports the line:
VERSION curl 7.49.1, ssl 1.0.2h, zlib 1.2.8
and that cgHasImageMagick() gives me 0.
The coyote page above suggests to update "the link (libz.a.dylib) to point to zlib version 1.2.8 instead of to version 1.2.3.", but I can't find that link (a search for libz.a.dylib returns nothing). Have you tried something like that before? As I has specified, I have the newest IDL version (8.6.1) so this page seems relevant.
Thanks!
|
|
|
Re: Broken CGFIXPS routine? [message #94719 is a reply to message #94717] |
Tue, 05 September 2017 07:43  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Tuesday, September 5, 2017 at 8:16:46 AM UTC-4, Matteo wrote:
>
> poor wording, my bad. Yes ImageMagick (ImageMagick-6.7.1-10) does seem to work when used from command line.
If ImageMagick is working then you can always create postscript files with your Coyote IDL routines, and convert them in a separate step from the command line.
The function cghasimagemagick.pro tries to determine if ImageMagick is present by seeing if the command
Spawn, 'convert -version', result, error_result
gives an error. Unfortunately, it appears that in some setups the above line returns an error even if ImageMagick is present. I might replace cghasimagemagick.pro with the following code:
function cghasimagemagick,version=version
version = ''
return,1
end
>
> I'm trying to look more into here:
> http://www.idlcoyote.com/graphics_tips/macspawnim.php
I don't think this page is relevant. It is for the case where CGHasImageMagic() reports true (imageMagick found) but gives zlib errors. You say that the problem is that ImageMagick can't be found.
--Wayne
|
|
|