Conversation
* No default title if nothing passed (making a title is very slow on a raspberry pi) * Sneaking a few cleanup items in
|
Exposure time would be nice on there. The fits_to_pretty does this already. Should actually move that default title out of the fits specific method and build it in process_image. |
| field_name = info['field_name'] | ||
|
|
||
| image_title = '{} {} {}'.format(field_name, | ||
| seq_id.replace('_', ' '), |
There was a problem hiding this comment.
FWIW, this implies to me that we should have two ways of tracking sequence id: the string needed for file paths and another for presentation.
There was a problem hiding this comment.
I think the Observation object itself should have a __str__ method that is better, but that wouldn't help much here as this is what is being passed around for the eventual FITS headers. But yes, fundamentally I agree. We pull this replace a lot.
|
|
||
| def make_pretty_image(fname, timeout=15, **kwargs): # pragma: no cover | ||
| """ Make a pretty image | ||
| def make_pretty_image(fname, title=None, timeout=15, **kwargs): # pragma: no cover |
There was a problem hiding this comment.
What do you think about adding an issue to add testing of this? It doesn't strike me as that hard to test.
There was a problem hiding this comment.
#608 also contains an item about adding testing for images. We currently don't test more of our images.
|
|
||
| Notes: | ||
| See `$POCS/scripts/cr2_to_jpg.sh` for CR2 process | ||
| See `/scripts/cr2_to_jpg.sh` for CR2 process. |
There was a problem hiding this comment.
Why did you remove $POCS? Assuming well founded, why not also remove the leading slash?
There was a problem hiding this comment.
I'm not sure why I did this. Will fix.
| filter_type = header.get('FILTER', 'Unknown filter') | ||
| date_time = header.get('DATE-OBS', current_time(pretty=True)).replace('T', ' ', 1) | ||
| if not title: | ||
| field = header.get('FIELD', 'Unknown') |
There was a problem hiding this comment.
Perhaps 'Unknown field' and 'Unknown duration'?
| field = header.get('FIELD', 'Unknown') | ||
| exp_time = header.get('EXPTIME', 'Unknown') | ||
| filter_type = header.get('FILTER', 'Unknown filter') | ||
| date_time = header.get('DATE-OBS', current_time(pretty=True)).replace('T', ' ', 1) |
There was a problem hiding this comment.
Could read the file time as a source of a date.
| norm = ImageNormalize(interval=PercentileInterval(clip_percent), stretch=LogStretch()) | ||
|
|
||
| fig = plt.figure(figsize=figsize, dpi=dpi) | ||
|
|
There was a problem hiding this comment.
A reminder about my request that we have images (plots) that can display on both white and black backgrounds.
There was a problem hiding this comment.
This would normally happen with the fig.savefig method, which is part of the OO interface. I've added a note in #608.
|
|
||
| if kwargs.get('primary', False): | ||
| cmd.append('link') | ||
| if title: |
…y-image-caption
…y-image-caption
Some fixes to the making of the image title. Follow up from comment in #493
titleparameter.@jamessynge this does not add any coordinates to the title. The
infodictionary has the coordinates for the field but I'm not sure that makes the most sense as pointing could be off. Coordinates for the center don't exist yet because this comes before plate-solve.