Skip to content

Commit

Permalink
Small updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
asgr committed Nov 6, 2023
1 parent 88b5099 commit 2f76265
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions R/profoundSegim.R
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ profoundSegimStats=function(image=NULL, segim=NULL, mask=NULL, sky=NULL, skyRMS=
}

profoundSegimPlot=function(image=NULL, segim=NULL, mask=NULL, sky=NULL, skyRMS=NULL, header=NULL,
col=rainbow(max(segim), end=2/3), profound=NULL, add=FALSE, sparse='auto', ...){
col=rainbow(max(segim), end=2/3), profound=NULL, add=FALSE, sparse='auto', useRaster=TRUE, ...){
if(add==FALSE){
if(!is.null(image)){
if(inherits(image, 'profound')){
Expand All @@ -1117,7 +1117,7 @@ profoundSegimPlot=function(image=NULL, segim=NULL, mask=NULL, sky=NULL, skyRMS=N
if(is.null(header)){header=profound$header}
}
if(!is.null(image)){
if(inherits(image, 'Rfit_image')){
if(inherits(image, 'Rfits_image')){
header = image$hdr
image = image$imDat
}else if(inherits(image, 'matrix')){
Expand Down Expand Up @@ -1152,7 +1152,7 @@ profoundSegimPlot=function(image=NULL, segim=NULL, mask=NULL, sky=NULL, skyRMS=N

segim = profoundSegimEdge(segim)

magimage(segim, col=c(NA, col), add=TRUE, magmap=FALSE, sparse=sparse)
magimage(segim, col=c(NA, col), add=TRUE, magmap=FALSE, sparse=sparse, useRaster=useRaster)

if(!is.null(mask)){
magimage(mask!=0, col=c(NA,hsv(alpha=0.2)), add=TRUE, magmap=FALSE, zlim=c(0,1), sparse=sparse)
Expand Down
5 changes: 4 additions & 1 deletion man/profoundSegimStats.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ profoundSegimStats(image = NULL, segim = NULL, mask = NULL, sky = NULL, skyRMS =

profoundSegimPlot(image = NULL, segim = NULL, mask = NULL, sky = NULL, skyRMS=NULL,
header = NULL, col = rainbow(max(segim), end=2/3), profound = NULL, add = FALSE,
sparse = 'auto', ...)
sparse = 'auto', useRaster = TRUE, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down Expand Up @@ -80,6 +80,9 @@ Logical; should just the segment contours be added to the current image? This al
}
\item{sparse}{
Determines whether the image pixels are sparse sampled to speed up plotting. If set to 2 it will only determine every 2nd pixel, and if 3 every 3rd etc. If 'auto' it means it will scale to produce a maximum number of 1,000 pixels on any side (on most monitors this is a fairly useful maximum, and ensures quick displaying of even very large images).
}
\item{useRaster}{
If TRUE a bitmap raster is used to plot the segmentation map segments instead of polygons. Setting to TRUE is faster, but it can looks fuzzy (so in that case, set to FALSE).
}
\item{\dots}{
Further arguments to be passed to \code{\link{magimage}}.
Expand Down
8 changes: 4 additions & 4 deletions man/profoundShareFlux.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
Redistribute Fluxes
}
\description{
Redistributes fluxes from a lower resolution segmentation map using the \option{sharemat} provided by \code{\link{profoundSegimShare}}.
Redistributes fluxes from a lower resolution segmentation map using the \option{sharemat} provided by \code{propaneSegimShare}.
}
\usage{
profoundShareFlux(segstats = NULL, sharemat = NULL, weights = NULL)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{segstats}{
Data.frame, the \code{\link{profoundProFound}} \option{segstats} output that has been created using the segmentation output by \code{\link{profoundSegimShare}}.
Data.frame, the \code{\link{profoundProFound}} \option{segstats} output that has been created using the segmentation output by \code{propaneSegimShare}.
}
\item{sharemat}{
Numeric matrix, the \option{sharemat} output that has been created by \code{\link{profoundSegimShare}}.
Numeric matrix, the \option{sharemat} output that has been created by \code{propaneSegimShare}.
}
\item{weights}{
Numeric vector; additional weights to modify fluxes by. If provided must be the same length as dim(sharemat)[2] (i.e. the original list of segment properties, not the input \option{segstats}).
Expand All @@ -32,7 +32,7 @@ Data.frame with minimal columns. Many properties cannot be redistributed, so we
Aaron Robotham
}
\seealso{
\code{\link{profoundSegimShare}}, \code{\link{profoundSegimWarp}}, \code{\link{profoundProFound}}
\code{\link{profoundProFound}}
}
\examples{
#None yet
Expand Down

0 comments on commit 2f76265

Please sign in to comment.