[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master a542541: Crop: small limit of check for wcsmod
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master a542541: Crop: small limit of check for wcsmode crop decreased to 1 |
Date: |
Mon, 21 Dec 2020 23:07:32 -0500 (EST) |
branch: master
commit a5425413f607f87c03021a670f18e100ae6b7ef6
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Crop: small limit of check for wcsmode crop decreased to 1
When Crop is in WCS mode, it will check to see if the given width is
reasonable. This is because it often happens that people confuse degrees
with arcseconds or vice-versa. There are two limits that cause Crop to
abort: a smaller limit and a larger limit.
Until now, the smaller width (after conversion to pixels) was 3 pixels. But
3 pixels is not unreasonable, 1 pixel is. With this commit, if the width is
smaller than 1 pixel an error is printed.
---
bin/crop/ui.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/crop/ui.c b/bin/crop/ui.c
index 8cda243..84096ca 100644
--- a/bin/crop/ui.c
+++ b/bin/crop/ui.c
@@ -554,7 +554,7 @@ ui_set_img_sizes(struct cropparams *p)
{
/* Convert the width in units of the input's WCS into pixels. */
pwidth = warray[i]/p->pixscale[i];
- if(pwidth<3 || pwidth>50000)
+ if(pwidth<1 || pwidth>50000)
error(EXIT_FAILURE, 0, "value %g (requested width along "
"dimension %zu) translates to %.0f pixels on this "
"dataset. This is probably not what you wanted. Note "
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master a542541: Crop: small limit of check for wcsmode crop decreased to 1,
Mohammad Akhlaghi <=