필터 지우기
필터 지우기

Select multiple frames from a single fits file

조회 수: 3 (최근 30일)
Kiruthiga Sekar
Kiruthiga Sekar 2019년 4월 17일
댓글: Kiruthiga Sekar 2019년 4월 17일
Hi,
I have a csv file and a fits file, I need to select multiple frames from the fits file based on the non-zero indices of a csv file. In the attached csv file, I need to select the 4th and 7th frame from the fits file, as it contains the non-zero values.Can someone help?
TIA

답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 17일
vals = csvread('Book4.csv');
frame_numbers = find(vals ~=0);
num_frame = length(frame_numbers);
frame_data = cell(num_frame,1);
for K = 1 : num_frame
frame_data{K} = fitsread('AppropriateFilenameGoesHere.fits', 'image', frame_numbers(K));
end
  댓글 수: 5
Walter Roberson
Walter Roberson 2019년 4월 17일
Please show the content of the finfo variable .
Kiruthiga Sekar
Kiruthiga Sekar 2019년 4월 17일
It is a single file with 2600 frames.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by