Skip to content

IRSA-636 Disable the band selection for PTF #426

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

Merged
merged 3 commits into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/firefly/js/templates/lightcurve/LcResult.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const StandardView = ({visToolbar, title, searchDesc, imagePlot, xyPlot, tables,
labelWidth={110}/>
</DownloadOptionPanel>
</DownloadButton>
)
);
};

const downloaderOptPanel = convertData.downloadOptions || defaultOptPanel;
Expand Down
17 changes: 5 additions & 12 deletions src/firefly/js/templates/lightcurve/ptf/PTFMissionOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,11 @@ export class PTFSettingBox extends PureComponent {
const tblModel = getTblById(LC.RAW_TABLE);
const wrapperStyle = {margin: '3px 0'};

var missionFilters = (<RadioGroupInputField key='band'
fieldKey={LC.META_FLUX_BAND} wrapperStyle={wrapperStyle}
alignment='horizontal'
options={[
{label: 'g', value: 'g'},
{label: 'R', value: 'r'}
var missionFilters = ( <div style={{ with:{labelWidth}, display:'inline-block', margin: '3px 0 6px 0'}} >
<br /> </div>);

]}/>);

return renderMissionView(generalEntries,missionEntries, missionFilters,tblModel,wrapperStyle,labelWidth , ptfOptionsReducer);
return renderMissionView(generalEntries,missionEntries,missionFilters,tblModel,wrapperStyle,labelWidth , ptfOptionsReducer);


}
Expand All @@ -42,7 +37,6 @@ PTFSettingBox.propTypes = {
missionEntries: PropTypes.object
};

//TODO, this is copied from WISE, need to refactor it after the images and other information are updated.
export const ptfOptionsReducer = (missionEntries, generalEntries) => {
return (inFields, action) => {
if (inFields) {
Expand All @@ -66,7 +60,6 @@ export const ptfOptionsReducer = (missionEntries, generalEntries) => {
};
};

//TODO, after the PTF images loaded, this function can be updated. It is the place holder for now.
function getFieldValidators(missionEntries) {
const fldsWithValidators = [
{key: LC.META_TIME_CNAME, vkey: LC.META_TIME_NAMES},
Expand Down Expand Up @@ -125,7 +118,7 @@ export function ptfOnNewRawTable(rawTable, missionEntries, generalEntries, conve
return {newLayoutInfo, shouldContinue: false};
}

//TODO if ptfRawTableRequest and ptfOnFieldUpdate are nothing different from the ones in wiseMssionOption, these two can be replaced.
//TODO if ptfRawTableRequest and ptfOnFieldUpdate are nothing different from the ones in ptfMssionOption, these two can be replaced.
export function ptfRawTableRequest(converter, source, uploadFileName='') {
const timeCName = converter.defaultTimeCName;
const mission = converter.converterId;
Expand Down Expand Up @@ -168,7 +161,7 @@ export function ptfDownloaderOptPanel (mission, cutoutSizeInDeg) {
cutoutSize={cutoutSizeInDeg}
title={'Image Download Option'}
dlParams={{
MaxBundleSize: 200 * 1024 * 1024, // set it to 200mb to make it easier to test multi-parts download. each wise image is ~64mb
MaxBundleSize: 200 * 1024 * 1024, // set it to 200mb to make it easier to test multi-parts download. each ptf image is ~33mb
FilePrefix: `${mission}_Files`,
BaseFileName: `${mission}_Files`,
DataSource: `${mission} images`,
Expand Down
7 changes: 3 additions & 4 deletions src/firefly/js/templates/lightcurve/ptf/PTFPlotRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {convertAngle} from '../../../visualize/VisUtil.js';
* @returns {WebPlotRequest}
*/
export function getWebPlotRequestViaPTFIbe(tableModel, hlrow, cutoutSize, params = {
bandName: 'g',
fluxCol: 'mag_autocorr',
dataSource: 'pid'
}) {
Expand All @@ -37,9 +36,9 @@ export function getWebPlotRequestViaPTFIbe(tableModel, hlrow, cutoutSize, params
try {

// flux/value column control this | unless UI has radio button band enabled, put bandName back here to match band
const band = `${params.bandName}`;
//const band = `${params.bandName}`;

let title = 'PTF-W' + band + '-' + pid;
let title = 'PTF-W' + '-' + pid;

const sr = new ServerRequest('ibe_file_retrieve');
sr.setParam('mission', 'ptf');
Expand All @@ -59,7 +58,7 @@ export function getWebPlotRequestViaPTFIbe(tableModel, hlrow, cutoutSize, params
sr.setParam('doCutout', 'true');
sr.setParam('size', `${cutoutSizeInDeg}`);
sr.setParam('subsize', `${cutoutSizeInDeg}`);
title = 'PTF-' + band + '-' + pid + (cutoutSize ? ` size: ${cutoutSize}(arcmin)` : '');
title = 'PTF-' + '-' + pid + (cutoutSize ? ` size: ${cutoutSize}(arcmin)` : '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need extra '-', remove it ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep yep, good catch

}

const reqParams = WebPlotRequest.makeProcessorRequest(sr, 'ptf');
Expand Down