HPkim

게시판 답변이 생성됐습니다

5 글 보임 - 1 에서 5 까지 (총 5 중에서)
  • 글쓴이
  • 답변: IMAGE 함수 질문드립니다. #5419
    HPkim
    회원

    덕분에 좋은 정보 알게되었습니다. 감사드립니다 !!!

    답변: image 그릴 때 log scale 표현 방법 #5234
    HPkim
    회원

    로스스케일로 다 변환은 했지만, error가 뜹니다..

    % QHULL:
    qhull precision error: 101 attempts to construct a convex hull
    with joggled input. Increase joggle above ‘QJ0.028’
    or modify qh_JOGGLE… parameters in user.h

    답변: image 그릴 때 log scale 표현 방법 #5232
    HPkim
    회원

    데이터파일과 코드입니다.
    https://drive.google.com/open?id=1rJjiCfLgRfczsjD9ssBk1SrJPtLkyk0Z

    file=file_search(‘\data\s*.cdf’)
    time=timegen(start=julday(6,25,2015,19,0,0),final=julday(6,26,2015,00,59,44), step_size=15, units=’second’)
    DB=[]

    FOR i=0, N_ELEMENTS(file)-1 DO BEGIN
    id=CDF_OPEN(file[i])
    cdf_control,id,variable=’time_db_dt’, get_var_info=info
    cdf_control,id,variable=’db_dt’, get_var_info=info1
    cdf_control,id,variable=’epoch_db_dt’, get_var_info=info2
    cdf_control,id,variable=’frequency’, get_var_info=info3
    cdf_control,id,variable=’sensitivity’, get_var_info=info4

    cdf_varget, id,’time_db_dt’,time_db_dt,rec_count=info.maxrec
    cdf_varget, id,’db_dt’,db_dt,rec_count=info1.maxrec
    cdf_varget,id,’epoch_db_dt’, epoch_db_dt, rec_count=info2.maxrec
    cdf_varget, id,’frequency’,frequency,rec_count=info3.maxrec
    cdf_varget, id,’sensitivity’,sensitivity,rec_count=info4.maxrec

    cdf_epoch, epoch_db_dt, yr, mo, dy, hr, mn, sc, milli, /break

    DB=[[DB],[db_dt]]

    ENDFOR

    n=N_ELEMENTS(DB[0,*])
    w=1024
    dt=0.015625
    Fs=1/dt
    ut_step_size=15.
    freq= findgen(w)
    freq= freq*Fs/w
    help, freq
    freq=freq[0:511]
    Fx=complexarr(w, n/(ut_step_size*Fs))
    Fy=complexarr(w, n/(ut_step_size*Fs))
    Fz=complexarr(w, n/(ut_step_size*Fs))
    help, fx
    FOR i=0.,n/(ut_step_size*Fs)-1. DO BEGIN

    Fx[*,i]=fft(DB[0,i*ut_step_size*Fs:(i*ut_step_size*Fs)+w-1])
    Fy[*,i]=fft(DB[1,i*ut_step_size*Fs:(i*ut_step_size*Fs)+w-1])
    Fz[*,i]=fft(DB[2,i*ut_step_size*Fs:(i*ut_step_size*Fs)+w-1])

    ENDFOR

    Fx=rotate(Fx,3)
    Fy=rotate(Fy,3)
    Fz=rotate(Fz,3)

    Fx=bytscl(alog10(abs(Fx)^2/0.0625),-13,-4)
    Fy=bytscl(alog10(abs(Fy)^2/0.0625),-8,-4)
    Fz=bytscl(alog10(abs(Fz)^2/0.0625),-8,-4)

    help, fx
    Fx=Fx[*,0:511]
    Fy=Fy[*,0:511]
    Fz=Fz[*,0:511]

    WIN=window(DIM=[1000,500])
    DUM=label_date(date_format=’%H:%I!C%D %M’)
    ct=colortable(33)
    c=image(Fx, time, freq, xtickformat=’label_date’, ytitle=’Freqyency[Hz]’, aspect_ratio=0.002, RGB_TABLE=ct, AXIS_STYLE=2, XMAJOR=7,/current)
    cp=c.position
    cb=COLORBAR(TARGET=c,TITLE=’log(nT!u2!n/Hz!u2!n)’, position=[cp[2]+0.01,cp[1],cp[2]+0.03,cp[3]],MAJOR=3,orientation=1,TEXTPOS=1,TICKNAME=[‘-13′,’ ‘,’-3′])

    END

    HPkim
    회원

    답변 감사합니다. 정말 많은 도움이 되었습니다.
    그리고 추가 질문이 있는데요, layout을 사용할 시, 하나의 panel에만 title을 설정하면 그 panel만 크기가 달라지는데, 해결 방법이 있는지요….

    HPkim
    회원

    추가 질문으로…
    !p.multi처럼 여러개의 panel을 한번에 그릴 수 있는지요?
    layout을 사용하니까 창이 새로 생성되네요..

5 글 보임 - 1 에서 5 까지 (총 5 중에서)