Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non common trend of readout pattern in each channel #10

Closed
2 tasks done
HajimeKawahara opened this issue Jan 29, 2022 · 4 comments
Closed
2 tasks done

non common trend of readout pattern in each channel #10

HajimeKawahara opened this issue Jan 29, 2022 · 4 comments
Milestone

Comments

@HajimeKawahara
Copy link
Contributor

HajimeKawahara commented Jan 29, 2022

I observed a non-common trend of the readout pattern in some order:
See #5 (comment).
This results in artifact in one-d raw spectrum for a faint object (can find it by performing REACH.py)

To remove this, some preparations are needed

  • RSD (raw spectral detector) matrix (rsdmat.py in spec) to see the effect (by taking median axis=1)
  • allocate channel position in a 1D raw spec

After that, consider how to remove it. probably GP?

@HajimeKawahara HajimeKawahara added this to the Version 0.1 milestone Jan 29, 2022
@HajimeKawahara
Copy link
Contributor Author

The following is an example of the artificial dip due to the non-common trend of the readout pattern (REACH.py):

local_trend

To make this figure, I implemented "RSD matrix" (spec/rsdmat.py), which is a matrix of (npix x norder) aligned to the detector 2D matrix. Here is the example of the conversion to use (for the above figure):

from pyird.spec.rsdmat import multiorder_to_rsd
rsd=multiorder_to_rsd(rawspec, pixcoord)

fig=plt.figure()
ax=fig.add_subplot(111)
for i,esp in enumerate(rawspec):
    plt.plot(pixcoord[i],esp,alpha=0.3, color="gray") #multi-order raw spec form for reference
plt.plot(np.nanmedian(rsd[:,-6:-1],axis=1),alpha=1.0, color="C1",label="median (-6:-1)") #can perform np.nanmedian for the axis of the orders
plt.plot(np.nanmedian(rsd[:,:],axis=1),alpha=1.0, color="C0",label="median")

This was referenced Jan 30, 2022
@HajimeKawahara
Copy link
Contributor Author

Fitting residuals to GP2Dcross model, anyway I was able to correct the non-common channel trend.

Use rm_nct (remove noncommon trend) option in median_XY_profile(calim, rm_nct=True):

Figure_2
Figure_3
Figure_1

@HajimeKawahara
Copy link
Contributor Author

This is a schematic picutre of the RSD matrix:

image

@HajimeKawahara
Copy link
Contributor Author

I think this was done anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant