Re: how to convert the date into julian date [message #80901] |
Wed, 25 July 2012 08:43  |
Bandrush Barda
Messages: 6 Registered: June 2012
|
Junior Member |
|
|
First of all, thank you so much, Ben.
I hope, your suggestion will help me a lot.
When I test the file according to your suggestion, definitely, something wrong with my file. Can you check the text?
1. using the first approach, it goes like this:
IDL> ok=file_test('D:/temperature')
IDL> print, ok
0
2. using second approach, there is something like this:
IDL> info=file_info('D:/temperature')
IDL> help, info,/str
** Structure FILE_INFO, 21 tags, length=64, data length=63:
NAME STRING 'D:\temperature'
EXISTS BYTE 0
READ BYTE 0
WRITE BYTE 0
EXECUTE BYTE 0
REGULAR BYTE 0
DIRECTORY BYTE 0
BLOCK_SPECIAL BYTE 0
CHARACTER_SPECIAL
BYTE 0
NAMED_PIPE BYTE 0
SETUID BYTE 0
SETGID BYTE 0
SOCKET BYTE 0
STICKY_BIT BYTE 0
SYMLINK BYTE 0
DANGLING_SYMLINK
BYTE 0
MODE LONG 0
ATIME LONG64 0
CTIME LONG64 0
MTIME LONG64 0
SIZE LONG64
Thanks a lot.
Bandrush
|
|
|
Re: how to convert the date into julian date [message #80926 is a reply to message #80901] |
Mon, 23 July 2012 06:35   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Monday, July 23, 2012 6:55:21 AM UTC-4, Bandrush Barda wrote:
> Hello everyone?
>
> I'd like to ask really simple question. I just want to make sure that all images that will be used further are required to be the same path as IDL or not. My IDL program is on C disk. I have saved all my files on D disk and then changed the IDL path into D disk where the my files are.
> why I'm asking this question is: when i try to read an image (7 bands, floating-point data, stored in tiff format, located in D disk) using import image file tool in IDL, there is an error saying 'Error opening the file: unit:100. file...(here file path)'.
> So what does it mean? Is this error related to the file path?
>
> Thanks in advance.
Hi,
It isn't possible to tell what is happening from what you have described. I suggest that you do a couple of things.
1. test that the file really exists by using
IDL> ok = FILE_TEST('theNameOfYourFileWithCompletePathIncludingDriveLe tter')
IDL> print,ok
2. check the read permissions on the file. I can't recall how to do that on windows, but within IDL you can use something like
IDL > info = FILE_INFO('theNameOfYourFileWithCompletePathIncludingDriveLe tter')
IDL > help, info,/str
3. if those don't help you resolve the issue, then the next thing is to paste the entire unedited error message you see into your next message to the group.
Cheers,
Ben
|
|
|
Re: how to convert the date into julian date [message #80997 is a reply to message #80901] |
Wed, 25 July 2012 12:10  |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, July 25, 2012 5:43:36 PM UTC+2, Bandrush Barda wrote:
> First of all, thank you so much, Ben.
> I hope, your suggestion will help me a lot.
>
> When I test the file according to your suggestion, definitely, something wrong with my file. Can you check the text?
>
> 1. using the first approach, it goes like this:
>
> IDL> ok=file_test('D:/temperature')
> IDL> print, ok
> 0
>
> 2. using second approach, there is something like this:
> IDL> info=file_info('D:/temperature')
> IDL> help, info,/str
> ** Structure FILE_INFO, 21 tags, length=64, data length=63:
> NAME STRING 'D:\temperature'
> EXISTS BYTE 0
> READ BYTE 0
> WRITE BYTE 0
> EXECUTE BYTE 0
> REGULAR BYTE 0
> DIRECTORY BYTE 0
> BLOCK_SPECIAL BYTE 0
> CHARACTER_SPECIAL
> BYTE 0
> NAMED_PIPE BYTE 0
> SETUID BYTE 0
> SETGID BYTE 0
> SOCKET BYTE 0
> STICKY_BIT BYTE 0
> SYMLINK BYTE 0
> DANGLING_SYMLINK
> BYTE 0
> MODE LONG 0
> ATIME LONG64 0
> CTIME LONG64 0
> MTIME LONG64 0
> SIZE LONG64
>
> Thanks a lot.
> Bandrush
Dear Bandrush,
I think your file does not exist as you wrote it... You need to specify also the extension. For example you should try:
IDL> print, file_test('D:/temperature.dat')
or
IDL> print, file_test('D:/temperature.txt')
or whatever extension you have.
Then if IDL writes a 1, it means that IDL found the file and it does exist. If you get a 0 it means that the file does not exist. You probably misspelled the file name or directory.
Cheers,
Helder
|
|
|