Giter Site home page Giter Site logo

sparc4-dev / astropop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliotux/astropop

6.0 3.0 3.0 2.68 MB

The ASTROnomical POlarimetry and Photometry pipeline

Python 100.00%
astronomy data-reduction image-processing photometry photometry-pipeline pipeline

astropop's Introduction

AstroPoP

Astropop's Github CI Status Astropop's Codecov Coverage Status Astropop's Documentation Status CODACY

The ASTROnomical POlarimetry and Photometry pipeline. Developed for work with IAGPOL and SPARC4 polarimeters at Observatório Pico dos Dias (Brazil), but suitable to be used in other image polarimeters around the world.

Features

This software is intended to provide a full pipeline to reduce raw polarimetry and photometry data taken with common CCD telescope cameras. It can do:

  • Create calibrate frames;
  • Calibrate images using bias/flat/dark frames;
  • Gain correction and in-processing image binnig;
  • Cosmic ray extraction (astroscrappy);
  • Align image sets;
  • Aperture and (planned) PSF photometry;
  • Calcite polarimeters;
    • Automatic pairs of stars identification;
  • Automatic photometry calibration using online catalogs.

Support and Community

We have a community of people using astropop to perform data reduction. Also, we use this community to offer support for astropop users. Join the community at astropop-users Google-Groups

Dependencies

Some of astropop dependencies (numpy, astropy, scipy, astroscrappy) need gcc to get build. Make sure gcc is installed properly in your system.

There is nothing that prevent astropop itself to run on Windows. However, due to problems that comes from dependencies, mainly numpy and astrometry.net, astropop is currently supported only on Linux and Mac.

Bellow we list all the necessary dependencies for the good working of the code. Note that this can be changed with the time.

  • astroalign;
  • astropy >= 4.3;
  • astroquery;
  • astroscrappy;
  • numpy >= 1.17;
  • scikit-image;
  • scikit-learn;
  • scipy;
  • sep.

Installation

Astropop can be downloaded from gh/sparc4-dev/astropop. It follows the stadard python package install procedure. All requirements can be installed with pip or conda.

Anaconda Environment

We recomend to use a anaconda environment to use astropop. Having the anaconda installed, use the following command to install a new <environment name> with conda dependencies:

conda create -n <environment name> -c conda-forge python=3.10 astroalign astropy astroquery astroscrappy matplotlib numpy pyyaml reproject scikit-image scikit-learn scipy sep

Once the environment is created, you can activate the environment and install the astropop with pip.

conda activate <environment name>

Stable Version

The stable version of astropop is available in PyPi and can be installed directly with pip command.

pip install astropop

Development Version

The development (unstable) version can be installed from the github code. With pip, can be done in any of the 3 ways:

pip install -U git+https://github.com/sparc4-dev/astropop

or

pip install -U https://github.com/sparc4-dev/astropop/archive/refs/heads/main.zip

or

git clone https://github.com/sparc4-dev/astropop
cd astropop
pip install -U .

Citing

ADS Reference Publications of the Astronomy Society of the Pacific arXiv preprint ASCL register

An article was published in Publications of the Astronomical Society of the Pacific, vol.131, n.996, pp.024501, which is the main reference to this work. If you do not have access to PASP, the preprint was uploaded to arXiv:1811.01408.

Also, for latex citation, you can use the following BibTex:

@article{Campagnolo_2018,
    doi = {10.1088/1538-3873/aaecc2},
        url = {https://doi.org/10.1088%2F1538-3873%2Faaecc2},
        year = 2018,
        month = {dec},
        publisher = {{IOP} Publishing},
        volume = {131},
        number = {996},
        pages = {024501},
        author = {Julio Cesar Neves Campagnolo},
        title = {{ASTROPOP}: the {ASTROnomical} {POlarimetry} and Photometry Pipeline},
        journal = {Publications of the Astronomical Society of the Pacific},
}

Documentation

Documentation (not complete yet) can be found at astropop.readthedocs.io

astropop's People

Contributors

juliotux avatar rudnerlq avatar fisicarol avatar fceoni avatar ffalkenbergm avatar claudiavr avatar masterhit avatar

Stargazers

Travis Thieme avatar  avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

astropop's Issues

Clip output for image registration

Add a function to clip a list of images to the same only-valid pixels frame based on the shifts. This argument can be added too to register_framedata_list.

WCS noisy messages

WCS errors show a lot of noisy warning messages like:

WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 58867.182049 from DATE-OBS'. [astropy.wcs.wcs]

Find a way to silent them.

Database: FutureWarning in columns checking.

Element wise comparison in database will be deprecated.

  if k in self.keywords or add_columns:
/home/wagner/anaconda3/envs/Astro/lib/python3.9/site-packages/astropop-0.5.4.dev10-py3.9.egg/astropop/_db.py:52: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

FrameData do not clean memmap files

FrameData is not cleaning tmp files during the class deletion. This means that when processing a large number of files, this will transform tmp dir in a mess.

Include an estimate of the theoretical polarization error

Sugiro utilizarmos a expressao do erro teorico da polarizacao do link abaixo. Ela inclui o ruido de Poisson das contagens da fonte e ceu, ruido de leitura e ganho. Essa expressao deve ser adaptada para uso em medidas do seguinte modo:

N* t_exp: valor medio das contagens somando os feixes ordinario e extraordinario por posicao da lamina
N_s* t_exp: valor medio das contagens do ceu por pixel por posicao da lamina  (sugiro usarmos o valor medio do ceu ord. e extraord.)

http://www.inpe.br/etc/docs/calculo_erro_polarizacao.pdf

FitsFileGroup needs concatenation and file removing

FitsFileGroup needs two features:

  • Sum of groups result in the concatenation of the group.

  • Currently we cannot remove a file, due to the missing drop of sql. As we use a auto numbering for index, drop may need copy the group without the line.

SQL backend for FitsFileGroups

FitsFileGroup currently only supports in-memory tables. This is fast, but not persistent and may present memory overflow problems. Implement a persistent file-based SQL backend may solve the problem. Once the file.db is created, there is no need to re-read all the images in the folder, just update/add.

Separate the reduction examples in documentation

Make different notebooks for each part of the DIY reduction script.

Possible organization:

  • Image organize, information extracting, reading and plotting example
  • Process and combine bias
  • Process and combine flat
  • Process science imges
  • Photometry (stacked)
  • Photometry (light curve)
  • Polarimetry
  • Astrometric calibration
  • Photometry calibration

Background mask

In aperture code, in background I miss a description about the parameter "mask". What could be? A number, an array... I read the code, but I could not understand.

Masking for daofind

Currently daofind uses no mask during source detection, just like the original implementation. photutils doesn't use it either. May be apply a mask before the convolution.

Silent fix warnings on image save

When image is saved with hierarch keywords, noise messages are printed:

WARNING: VerifyWarning: Keyword name 'astropop lacosmic' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]

They are shown by astropy and by astropop.logger. Try to find a way to silent them.

Registration: maximum limits

Add maximum translation and rotation limits to exclude an image from the registration process. Useful for register_framdedata_list.

aperture_photometry

Olá Julio,

Estou testando essa função do github.
Acho que seria interessante ter um indice númerico para cada objeto na tabela de saída da rotina aperture_photometry, pois assim fica mais fácil de selecionar a estrela de interesse.

Abraços, Wagner.

Register: add option to skip failing images

When computing the shift list or perform image registration, add an argument to do not break due to a single image failure. Instead, return nan shifts and full masked/full nan registered image.

More complete photometry informations

The aperture photometry should return more columns with important missing information:

  • number of pixels in the aperture
  • number of pixels in sky annulus
  • ...

Registration: need native byte order issue

Both cross-correlation and asterism-matching need native byte order. Perform sep fixing on registering too.

2022-07-06 09:19:07,346 astropop - INFO - reading file 0 from 5: reduced/gd108/FB2022041720184978_C1.fits  [file_collection]
/home/wagner/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/_db.py:93: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if k in self.keywords or add_columns:
/home/wagner/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/_db.py:52: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if item not in self.keywords:
/home/wagner/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/_db.py:33: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if name in self.keywords:
/home/wagner/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/_db.py:38: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  while col in self.keywords:
2022-07-06 09:19:07,421 astropop - INFO - reading file 1 from 5: reduced/gd108/FB2022041720205104_C1.fits  [file_collection]
2022-07-06 09:19:07,436 astropop - INFO - reading file 2 from 5: reduced/gd108/FB2022041720225229_C1.fits  [file_collection]
2022-07-06 09:19:07,473 astropop - INFO - reading file 3 from 5: reduced/gd108/FB2022041720245353_C1.fits  [file_collection]
2022-07-06 09:19:07,516 astropop - INFO - reading file 4 from 5: reduced/gd108/FB2022041720265478_C1.fits  [file_collection]

Total files: 5
Star files (GD 108 - V): 5
['reduced/gd108/FB2022041720184978_C1.fits', 'reduced/gd108/FB2022041720205104_C1.fits', 'reduced/gd108/FB2022041720225229_C1.fits', 'reduced/gd108/FB2022041720245353_C1.fits', 'reduced/gd108/FB2022041720265478_C1.fits']

2022-07-06 09:19:18,244 astropop - INFO - Registering image 1 from 5  [register]
2022-07-06 09:19:18,274 astropop - INFO - Images are equal, skipping registering.  [register]

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [2], in <cell line: 27>()
     12 gd108_V2_frames = list(gd108_V2_fg.framedata(unit='adu', use_memmap_backend=True))
     14 #gd108_V2_frames[0] = gd108_V2_frames[0].astype(np.float32)
     15 #gd108_V2_frames[1] = gd108_V2_frames[1].astype(np.float32)
     16 #gd108_V2_frames[2] = gd108_V2_frames[2].astype(np.float32)
   (...)
     24 
     25 #print(*gd108_V2_frames)
---> 27 registered_frames = register_framedata_list(gd108_V2_frames, algorithm='asterism-matching', inplace=True)
     28 #registered_frames = register_framedata_list(gd108_V2_frames)
     30 imagem_combinada = imcombine(registered_frames, method='sum')

File ~/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/image/register.py:425, in register_framedata_list(frame_list, algorithm, ref_image, clip_output, cval, inplace, **kwargs)
    423 for i in range(n):
    424     logger.info('Registering image %i from %i', i+1, n)
--> 425     reg_list[i] = reg.register_framedata(frame_list[ref_image],
    426                                          frame_list[i],
    427                                          cval=cval, inplace=inplace)
    429 if clip_output:
    430     shifts = [(i.meta['astropop registration_shift_x'],
    431                i.meta['astropop registration_shift_y']) for i in reg_list]

File ~/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/image/register.py:184, in _BaseRegister.register_framedata(self, frame1, frame2, cval, inplace)
    182 if not frame2.uncertainty.empty:
    183     unct = frame2.get_uncertainty(return_none=False)
--> 184     unct = self._apply_transform_image(unct,
    185                                        tform, cval=np.nan)
    186     reg_frame.uncertainty = unct
    188 sx, sy = tform.translation

File ~/anaconda3/envs/astropop/lib/python3.9/site-packages/astropop/image/register.py:62, in _BaseRegister._apply_transform_image(image, tform, cval)
     59 @staticmethod
     60 def _apply_transform_image(image, tform, cval=0):
     61     """Apply the transform to an image."""
---> 62     return transform.warp(image, tform, mode='constant', cval=cval,
     63                           preserve_range=True)

File ~/anaconda3/envs/astropop/lib/python3.9/site-packages/skimage/transform/_warps.py:944, in warp(image, inverse_map, map_args, output_shape, order, mode, cval, clip, preserve_range)
    942 ctype = 'float32_t' if image.dtype == np.float32 else 'float64_t'
    943 if image.ndim == 2:
--> 944     warped = _warp_fast[ctype](image, matrix,
    945                                output_shape=output_shape,
    946                                order=order, mode=mode, cval=cval)
    947 elif image.ndim == 3:
    948     dims = []

File ~/anaconda3/envs/astropop/lib/python3.9/site-packages/skimage/transform/_warps_cy.pyx:71, in skimage.transform._warps_cy._warp_fast()

ValueError: Big-endian buffer not supported on little-endian compiler

identify saturated objects

It is necessary to identify saturated objects.

A possible solution is to identify saturated pixels and mask them in the very first steps of data reduction (calibration).

qfloat em operação logaritma

O qfloat não está funcionando para operações logaritmas. Poe exemplo:
fluxes = qfloat(value=flux, uncertainty=flux_error, unit=None)
mag = -2.5*np.log10(fluxes)
mag.nominal # valor da magnitude
mag.std # valor do erro da magnitude

Dá o seguinte erro:

TypeError: operand type(s) all returned NotImplemented from array_ufunc(<ufunc 'log10'>, 'call', <QFloat
array([[1210000+-3000, 774000+-3000, 58000+-3000, 152000+-3000,
70000+-3000, 198000+-3000, 3841000+-3000, 11269000+-4000,
241000+-3000, 84000+-3000, 127000+-3000, 222000+-3000,
2934000+-3000, 86000+-3000]], dtype=object)
unit=>): 'QFloat'

rms for half-wave plate

Não consigo calcular o rms para os meus dados, aparentemente porque psi = None, deveria ser isso mesmo ou tem algo que precisa ser alterado?

Se eu faço 'resul[0].p' obtenho um valor no formato qfloat, mas se faço 'resul[0].rms' obtenho o erro abaixo.

ValueError Traceback (most recent call last)
/tmp/ipykernel_46847/1304169150.py in
----> 1 resul[0].rms

~/anaconda3/lib/python3.9/site-packages/astropop/polarimetry/dualbeam.py in rms(self)
222 """Root mean square of the fitting."""
223 if self.zi is None or self.psi is None:
--> 224 raise ValueError('StokesParameters without zi and psi data has no '
225 'fitting rms')
226

ValueError: StokesParameters without zi and psi data has no fitting rms

PSF Photometry

Implement PSF photometry in astropop.

  • Analytical PSF, moffat and gaussian models
  • PSF generated from the image

Couldn't find the rms value in the Stokes Parameters

The output of the SLSDualBeamPolarimetry.compute doesn't provide the rms value.
For example (snorm is my variable containing the Stokes Parameters):

snorm.rms


UnitConversionError Traceback (most recent call last)
~/.local/lib/python3.8/site-packages/astropy/units/quantity_helper/helpers.py in get_converters_and_unit(f, unit1, unit2)
67 try:
---> 68 converters[changeable] = get_converter(unit2, unit1)
69 except UnitsError:

~/.local/lib/python3.8/site-packages/astropy/units/quantity_helper/helpers.py in get_converter(from_unit, to_unit)
31 i.e., if the inferred scale is unity."""
---> 32 converter = from_unit._get_converter(to_unit)
33 return None if converter is unit_scale_converter else converter

~/.local/lib/python3.8/site-packages/astropy/units/core.py in _get_converter(self, other, equivalencies)
1060
-> 1061 raise exc
1062

~/.local/lib/python3.8/site-packages/astropy/units/core.py in _get_converter(self, other, equivalencies)
1045 try:
-> 1046 return self._apply_equivalencies(
1047 self, other, self._normalize_equivalencies(equivalencies))

~/.local/lib/python3.8/site-packages/astropy/units/core.py in _apply_equivalencies(self, unit, other, equivalencies)
1021
-> 1022 raise UnitConversionError(
1023 f"{unit_str} and {other_str} are not convertible")

UnitConversionError: '' (dimensionless) and 'rad' (angle) are not convertible

During handling of the above exception, another exception occurred:

UnitConversionError Traceback (most recent call last)
in
----> 1 snorm.rms

~/.local/lib/python3.8/site-packages/astropop/polarimetry/dualbeam.py in rms(self)
231 model = partial(halfwave_model, q=self.q, u=self.u, zero=self.zero)
232
--> 233 return np.std(self.zi-model(self.psi))
234
235

~/.local/lib/python3.8/site-packages/astropop/polarimetry/dualbeam.py in quarterwave_model(psi, q, u, v, zero)
145 if zero is not None:
146 psi = psi+zero # avoid inplace modification
--> 147 psi = np.radians(psi)
148 psi2 = 2psi
149 zi = q
(np.cos(psi2)**2) + u*np.sin(psi2)np.cos(psi2) - vnp.sin(psi2)

~/.local/lib/python3.8/site-packages/astropop/math/physical.py in array_ufunc(self, ufunc, method, *inputs, **kwargs)
479 raise NotImplementedError("out argument not supported yet.")
480
--> 481 result = HANDLED_UFUNCS[ufunc](*inputs, **kwargs)
482
483 return result

~/.local/lib/python3.8/site-packages/astropop/math/physical.py in _qfloat_radians(qf, *args, **kwargs)
895 def _qfloat_radians(qf, *args, **kwargs):
896 """Convert any qfloat angle to radian."""
--> 897 return qf.to(units.radian)
898
899

~/.local/lib/python3.8/site-packages/astropop/math/physical.py in to(self, unit)
396 """
397 other = units.Unit(unit, parse_strict='silent')
--> 398 (_, conv), unit = get_converters_and_unit(self.to, other, self.unit)
399 if conv is not None:
400 nvalue = conv(self.nominal)

~/.local/lib/python3.8/site-packages/astropy/units/quantity_helper/helpers.py in get_converters_and_unit(f, unit1, unit2)
68 converters[changeable] = get_converter(unit2, unit1)
69 except UnitsError:
---> 70 raise UnitConversionError(
71 "Can only apply '{}' function to quantities "
72 "with compatible dimensions"

UnitConversionError: Can only apply 'to' function to quantities with compatible dimensions

astropop.photometry.aperture.aperture_photometry

The documentation should describe what exactly is returned by this routine, i.e, what is the format and meaning of the output in res_ap.

It seems to be:

  • x
  • y
  • aperture
  • total counts
  • counts error
  • number of the object in the image
  • sky counts

On top of that, the "number of the object in the image" seems to be incorrect. See Fernando's reduction below, col. 6, which is always zero:

[[(483.98971408, 169.67461947, 12, 6.57909962e+03, 1576.63798585, 0, 2713.12303992, 0, '2458312.37674', 2458312.37520036)
(542.62604594, 228.16368672, 12, 8.47213064e+03, 1574.19252463, 0, 2702.68457977, 0, '2458312.37674', 2458312.37520036)
(499.12359304, 452.86218983, 12, 7.21538910e+05, 1774.85594836, 0, 2657.99656215, 0, '2458312.37674', 2458312.37520036)
(557.96256978, 512.75959759, 12, 6.85888115e+05, 1761.11679589, 0, 2643.4260971 , 0, '2458312.37674', 2458312.37520036)
(487.58575232, 593.39029422, 12, 1.92387729e+04, 1549.03921915, 0, 2604.15365926, 0, '2458312.37674', 2458312.37520036)
(546.25505038, 653.30165897, 12, 1.96218020e+04, 1543.44068187, 0, 2584.82999245, 0, '2458312.37674', 2458312.37520036)
(545.81088742, 655.57464459, 12, 1.86900427e+04, 1543.03188205, 0, 2584.40989885, 0, '2458312.37674', 2458312.37520036)
( 34.02963504, 796.43236277, 12, 5.41654455e+03, 1512.75187773, 0, 2498.09081685, 0, '2458312.37674', 2458312.37520036)
(305.64691661, 1020.35337935, 12, 4.43651076e+02, 1236.18138678, 16, 2513.75323108, 0, '2458312.37674', 2458312.37520036)]
[(484.08971408, 170.77461947, 12, 8.89234750e+03, 1552.69918243, 0, 2628.47695874, 1, '2458312.37684', 2458312.37530035)
(542.72604594, 229.26368672, 12, 8.51988146e+03, 1551.01905323, 0, 2623.19765075, 1, '2458312.37684', 245831

Astrometry.net index files as argument

The astrometry.net index files folder should be argument when create the AstrometrySolver instance. Functions also should recieve program path as argument.

Code to refactor:

  • AstrometrySolver
  • solve_astrometry_xy
  • solve_astrometry_image
  • solve_astrometry_hdu

documentation

Na documentação

https://astropop.readthedocs.io/en/latest/index.html

os índices em fundo preto do menu lateral esquerdo e o índice do frame principal não levam a conteúdo relevante. Toda a documentação aparece como um índice dentro do item "Make your own...". Isso me parece confuso e deixa difícil encontrar o conteúdo. Isso está certo ou tem como melhorar os links?

Problem with "compute_shift_list"

Percebi que em algumas das minhas séries de imagens o "compute_shift_list" tem gerado uma lista de shifts incorreta.

Por exemplo:

Quando eu executo o comando:

"shift_list = compute_shift_list(hd94851_framesv,ref_image=0, algorithm='cross-correlation', upsample_factor=10)"

o shift list de um conjunto de 16 imagens de uma estrela padrão sai da seguinte forma:

image dx dy
1.0 0.0 0.0
2.0 60.1 58.9
3.0 0.9 -2.3
4.0 0.3 -2.1
5.0 0.9 -1.7
6.0 0.4 -1.8
7.0 1.2 -1.0
8.0 1.8 0.1
9.0 2.3 1.3
10.0 2.3 3.2
11.0 2.7 5.1
12.0 2.3 4.1
13.0 1.9 2.2
14.0 1.7 1.7
15.0 1.2 1.4
16.0 0.8 0.9

Percebi que na imagem n.2 o shifts estão deslocados (aparentemente o algoritmo está confundindo feixe ordinário com o extraordinário). Já verifiquei manualmente que esse shift da imagem 2 não é real.

Além disso, quando eu mudo a imagem de referência os shifts mudam de uma forma que não faz sentido pra mim:

"shift_list = compute_shift_list(hd94851_framesv,ref_image=1, algorithm='cross-correlation', upsample_factor=1000)"

image dx dy
1.0 -60.103 -58.881
2.0 0.0 0.0
3.0 -0.501 -0.6950000000000001
4.0 -0.33 -1.396
5.0 1.038 -1.058
6.0 -1.158 -1.147
7.0 0.501 1.296
8.0 1.685 2.531
9.0 2.833 3.84
10.0 -0.18 4.471
11.0 0.788 5.782
12.0 0.69 4.705
13.0 0.317 3.001
14.0 0.696 2.161
15.0 0.295 1.873
16.0 3.885 2.348

E também:

"shift_list = compute_shift_list(hd94851_framesv,ref_image=2, algorithm='cross-correlation', upsample_factor=1000)"

image dx dy
1.0 -0.864 2.29
2.0 0.501 0.6950000000000001
3.0 0.0 0.0
4.0 -0.139 0.088
5.0 0.009 0.237
6.0 0.012 0.215
7.0 0.353 1.541
8.0 1.117 2.605
9.0 1.555 3.928
10.0 1.295 5.494
11.0 1.824 6.404
12.0 1.674 5.849
13.0 0.812 3.94
14.0 1.197 3.851
15.0 0.509 2.802
16.0 0.486 3.162

Normalization in polarimetry computation

Current implementation of polarimetry computation is blocked by not implemented normalization.

The $k$ normalization is needed, specially with Savart analysers that can produce ordinary and extraordinary beams with different PSFs. $k$ is used for:

$$ z_i = \frac{F_{o,i} - F_{e,i} \cdot k}{F_{o,i} + F_{e,i} \cdot k} $$

For half-wave and quarter-wave retarders there are two methods:

Half-Wave retarder: $k$ depends only of counts and can be calculated using the sum of ordinary and extraordinary sources for complete sets of 4 plate positions:

$$ k = \frac{\sum F_o}{\sum F_e} $$

Quarter-Wave retarder: $k$ depends on the polarization, that depends of the zero position of the retarder. Current implementation of pccdpack find the zero by minimizing the error in $V$ Stokes parameter and iteratively compute a new $k$ using:

$$ k = \frac{1 + 0.5Q}{1 - 0.5Q} $$

Imcombine: memory overflow

When combining a large number of images, imcombine is using more memory then expected. This is critical and causing errors.

kwargs for aperture photometry

In aperture_photometry function, pass **kwargs for sep.sum_circle or sep.sum_annulus to allow better control, like pixelization.

Catalog matching with magnitude checking

Do catalog matches simply by coordinates may lead to errors, with identification mismatch specially in dense catalogs.

A method for cross-match catalog sources with observed stars may include magnitude in the account.

Options:

  • Match candidates and find what fits better the magnitude.
  • Use kdtree(ra,dec,mag) for find the candidates. The fact that the range in magnitude is much bigger than the range in coordinates may need a scaled magnitude, like (0.1*mag).

quarter-wave polarimetry task

We need a task to calculate the Stokes parameters of a dataset obtained using the IAGPOL + quarter-wave retarder plate. The angular optical position of the retarder should be a free parameter.

MemMapArray noisy deletion

When a MemMapArray is deleted when not memmapped, a TypeError is raised.

Exception ignored in: <function MemMapArray.__del__ at 0x7fca89edcf80>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/astropop/framedata/memmap.py", line 319, in __del__
    os.remove(self._filename)
TypeError: remove: path should be string, bytes or os.PathLike, not NoneType

FrameData: implement comments for meta cards

Currently FrameData don't support comments for the cards, like fits.Header. Implement it.

Be careful with fields that receive tuples with 2 values, like (x, y) that are considered a pair value/comment by astropy fits.

Also, this needs a custom writer for FrameData.

Background values

In aperture code, in background, would be interesting take the sky value and the sky_error separately. Like sky.value and sky.error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.