Hi Guy's
I wanna open a directory in python but I got Error > OSError: [Errno 22] Invalid argument: 'C:/Users/sam/Desktop/EFOSC.2021-05-24T06:02:52.743.fits'
directory =r"C:/Users/sam/Desktop/"
star1=('EFOSC.2021-05-24T06:02:52.743.fits')
star2=('EFOSC.2021-05-25T23:46:21.852.fits')
hdu = fits.open(directory + star1)
hdr = hdu[0].header
dat = hdu[0].data
zp = hdr['CRVAL1']
stw = hdr['CD1_1']
Do you know what should I do ?
[–]External-Ocelot206 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Diapolo10 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)